Skip to content

Commit

Permalink
More syntax cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dimfeld committed Oct 12, 2015
1 parent c43978b commit 263c5f5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions client/fingerprint/env_gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ func (f *EnvGCEFingerprint) Fingerprint(cfg *config.Config, node *structs.Node)
var interfaces []GCEMetadataNetworkInterface
if err := json.Unmarshal([]byte(value), &interfaces); err != nil {
f.logger.Printf("[WARN] fingerprint.env_gce: Error decoding network interface information: %s", err.Error())
} else {
for _, intf := range interfaces {
prefix := "platform.gce.network." + lastToken(intf.Network)
node.Attributes[prefix] = "true"
node.Attributes[prefix+".ip"] = strings.Trim(intf.Ip, "\n")
for index, accessConfig := range intf.AccessConfigs {
node.Attributes[prefix+".external-ip."+strconv.Itoa(index)] = accessConfig.ExternalIp
}
}

for _, intf := range interfaces {
prefix := "platform.gce.network." + lastToken(intf.Network)
node.Attributes[prefix] = "true"
node.Attributes[prefix+".ip"] = strings.Trim(intf.Ip, "\n")
for index, accessConfig := range intf.AccessConfigs {
node.Attributes[prefix+".external-ip."+strconv.Itoa(index)] = accessConfig.ExternalIp
}
}

Expand Down

0 comments on commit 263c5f5

Please sign in to comment.