From b4efe626d7dda5615d102da5032a3024faa6ac95 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 7 Nov 2020 13:03:44 +0200 Subject: [PATCH] lib/promscrape/discovery/kubernetes: `go fmt` --- lib/promscrape/discovery/kubernetes/common_types.go | 8 ++++---- lib/promscrape/discovery/kubernetes/node.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/promscrape/discovery/kubernetes/common_types.go b/lib/promscrape/discovery/kubernetes/common_types.go index 12de38962..d1bc21203 100644 --- a/lib/promscrape/discovery/kubernetes/common_types.go +++ b/lib/promscrape/discovery/kubernetes/common_types.go @@ -22,13 +22,13 @@ type ObjectMeta struct { func (om *ObjectMeta) registerLabelsAndAnnotations(prefix string, m map[string]string) { for _, lb := range om.Labels { ln := discoveryutils.SanitizeLabelName(lb.Name) - m[prefix + "_label_" + ln] = lb.Value - m[prefix + "_labelpresent_" + ln] = "true" + m[prefix+"_label_"+ln] = lb.Value + m[prefix+"_labelpresent_"+ln] = "true" } for _, a := range om.Annotations { an := discoveryutils.SanitizeLabelName(a.Name) - m[prefix + "_annotation_" + an] = a.Value - m[prefix + "_annotationpresent_" + an] = "true" + m[prefix+"_annotation_"+an] = a.Value + m[prefix+"_annotationpresent_"+an] = "true" } } diff --git a/lib/promscrape/discovery/kubernetes/node.go b/lib/promscrape/discovery/kubernetes/node.go index 02ba6b256..9a584c67e 100644 --- a/lib/promscrape/discovery/kubernetes/node.go +++ b/lib/promscrape/discovery/kubernetes/node.go @@ -95,7 +95,7 @@ func (n *Node) appendTargetLabels(ms []map[string]string) []map[string]string { } addrTypesUsed[a.Type] = true ln := discoveryutils.SanitizeLabelName(a.Type) - m["__meta_kubernetes_node_address_" + ln] = a.Address + m["__meta_kubernetes_node_address_"+ln] = a.Address } ms = append(ms, m) return ms