Skip to content

Commit

Permalink
clean up some lingering pointer operations
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed Oct 5, 2023
1 parent 613016b commit f3abe2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions equinix/helpers_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ func ipAddressSchema() *schema.Resource {
func getDeviceMap(device metalv1.Device) map[string]interface{} {
networkInfo := getNetworkInfo(device.IpAddresses)
sort.SliceStable(networkInfo.Networks, func(i, j int) bool {
famI := int(*networkInfo.Networks[i]["family"].(*int32))
famJ := int(*networkInfo.Networks[j]["family"].(*int32))
pubI := *networkInfo.Networks[i]["public"].(*bool)
pubJ := *networkInfo.Networks[j]["public"].(*bool)
famI := int(networkInfo.Networks[i]["family"].(int32))
famJ := int(networkInfo.Networks[j]["family"].(int32)))

Check failure on line 245 in equinix/helpers_device.go

View workflow job for this annotation

GitHub Actions / Test

syntax error: unexpected ) at end of statement

Check failure on line 245 in equinix/helpers_device.go

View workflow job for this annotation

GitHub Actions / Build

syntax error: unexpected ) at end of statement
pubI := networkInfo.Networks[i]["public"].(bool)
pubJ := networkInfo.Networks[j]["public"].(bool)
return getNetworkRank(famI, pubI) < getNetworkRank(famJ, pubJ)
})
keyIDs := []string{}
Expand Down

0 comments on commit f3abe2e

Please sign in to comment.