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 17, 2023
1 parent 81a163d commit 209143e
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))
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 209143e

Please sign in to comment.