mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-27 23:26:37 +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, "")
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ func TestMultipleDirectories(t *testing.T) {
|
||||
err := val.Write(&metric)
|
||||
require.NoError(t, err)
|
||||
|
||||
//nolint:modernize,perfsprint
|
||||
got += metric.String()
|
||||
}
|
||||
|
||||
@@ -102,6 +103,7 @@ func TestDuplicateFileName(t *testing.T) {
|
||||
err := val.Write(&metric)
|
||||
require.NoError(t, err)
|
||||
|
||||
//nolint:perfsprint
|
||||
got += metric.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user