From 263c5f5727711576ec5e2eb511a359c55aa7a2a6 Mon Sep 17 00:00:00 2001 From: Daniel Imfeld Date: Mon, 12 Oct 2015 17:57:45 -0500 Subject: [PATCH] More syntax cleanup --- client/fingerprint/env_gce.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/fingerprint/env_gce.go b/client/fingerprint/env_gce.go index 041a11791..b20978db0 100644 --- a/client/fingerprint/env_gce.go +++ b/client/fingerprint/env_gce.go @@ -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 } }