Remove unnecessary for loop in makeLabelPairs()

Fixes:
value.go:155:2: should replace loop with labelPairs = append(labelPairs, desc.constLabelPairs...) (S1011)

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
This commit is contained in:
Karsten Weiss 2018-04-13 22:15:28 +02:00
parent daa9993ded
commit 66b5a26cec
1 changed files with 1 additions and 3 deletions

View File

@ -152,9 +152,7 @@ func makeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair {
Value: proto.String(labelValues[i]),
})
}
for _, lp := range desc.constLabelPairs {
labelPairs = append(labelPairs, lp)
}
labelPairs = append(labelPairs, desc.constLabelPairs...)
sort.Sort(LabelPairSorter(labelPairs))
return labelPairs
}