From f2a76390e1fa7fee7b064d9a490f83284ceeec57 Mon Sep 17 00:00:00 2001 From: Renato Arruda Date: Thu, 26 Sep 2024 14:02:08 +0200 Subject: [PATCH] lint --- pkg/metrics_store/metrics_store.go | 1 + pkg/metrics_store/metrics_writer.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/metrics_store/metrics_store.go b/pkg/metrics_store/metrics_store.go index 2e6831be3..d0be4bdff 100644 --- a/pkg/metrics_store/metrics_store.go +++ b/pkg/metrics_store/metrics_store.go @@ -20,6 +20,7 @@ import ( "sync" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/kube-state-metrics/v2/pkg/metric" ) diff --git a/pkg/metrics_store/metrics_writer.go b/pkg/metrics_store/metrics_writer.go index 05f2196dc..1deec8711 100644 --- a/pkg/metrics_store/metrics_writer.go +++ b/pkg/metrics_store/metrics_writer.go @@ -62,7 +62,7 @@ func (m MetricsWriter) WriteAll(w io.Writer) error { } var err error - m.stores[0].metrics.Range(func(key interface{}, value interface{}) bool { + m.stores[0].metrics.Range(func(_ interface{}, _ interface{}) bool { _, err = w.Write([]byte(help)) if err != nil { err = fmt.Errorf("failed to write help text: %v", err) @@ -74,7 +74,7 @@ func (m MetricsWriter) WriteAll(w io.Writer) error { } for _, s := range m.stores { - s.metrics.Range(func(key interface{}, value interface{}) bool { + s.metrics.Range(func(_ interface{}, value interface{}) bool { metricFamilies := value.([][]byte) _, err = w.Write(metricFamilies[i]) if err != nil {