Skip to content

Commit

Permalink
fix gofmt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyseto-netapp committed Apr 2, 2020
1 parent 639e1cd commit bac2735
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions plugins/inputs/kube_inventory/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func (ki *KubernetesInventory) gatherService(s v1.Service, acc telegraf.Accumula
"namespace": s.Metadata.GetNamespace(),
}

for key, val := range s.GetSpec().GetSelector() {
tags["selector_" + key] = val
}
for key, val := range s.GetSpec().GetSelector() {
tags["selector_"+key] = val
}

var getPorts = func() {
for _, port := range s.GetSpec().GetPorts() {
Expand Down
8 changes: 4 additions & 4 deletions plugins/inputs/kube_inventory/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ func TestService(t *testing.T) {
},
ExternalIPs: []string{"1.0.0.127"},
ClusterIP: toStrPtr("127.0.0.1"),
Selector: map[string]string {
"sel1": "val1",
},
Selector: map[string]string{
"sel1": "val1",
},
},
Metadata: &metav1.ObjectMeta{
Generation: toInt64Ptr(12),
Expand Down Expand Up @@ -80,7 +80,7 @@ func TestService(t *testing.T) {
"port_protocol": "TCP",
"cluster_ip": "127.0.0.1",
"ip": "1.0.0.127",
"selector_sel1": "val1",
"selector_sel1": "val1",
},
},
},
Expand Down

0 comments on commit bac2735

Please sign in to comment.