Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rarruda committed Sep 26, 2024
1 parent 3e2d1e9 commit f2a7639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/metrics_store/metrics_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"sync"

"k8s.io/apimachinery/pkg/api/meta"

"k8s.io/kube-state-metrics/v2/pkg/metric"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/metrics_store/metrics_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit f2a7639

Please sign in to comment.