mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-03 09:06:35 +00:00
chore(deps): update dependency golangci/golangci-lint to v2.6.0 (#2246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -183,17 +184,7 @@ func (c *Collector) convertMetricFamily(logger *slog.Logger, metricFamily *dto.M
|
||||
}
|
||||
|
||||
for k := range allLabelNames {
|
||||
present := false
|
||||
|
||||
for _, name := range names {
|
||||
if k == name {
|
||||
present = true
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !present {
|
||||
if !slices.Contains(names, k) {
|
||||
names = append(names, k)
|
||||
values = append(values, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user