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:
parent
daa9993ded
commit
66b5a26cec
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue