Skip to content

Commit

Permalink
Lint for unused vars and duplicate imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Jun 18, 2024
1 parent 490b7b4 commit 9d33bdf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/generator/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,6 @@ func (n noopAppender) UpdateMetadata(prometheus_storage.SeriesRef, labels.Labels
return 0, nil
}

func (n noopAppender) AppendCTZeroSample(ref prometheus_storage.SeriesRef, l labels.Labels, t, ct int64) (prometheus_storage.SeriesRef, error) {
func (n noopAppender) AppendCTZeroSample(_ prometheus_storage.SeriesRef, _ labels.Labels, _, _ int64) (prometheus_storage.SeriesRef, error) {
return 0, nil
}
5 changes: 2 additions & 3 deletions modules/generator/registry/appender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/metadata"
"github.com/prometheus/prometheus/storage"
prometheus_storage "github.com/prometheus/prometheus/storage"
)

type noopAppender struct{}
Expand Down Expand Up @@ -42,7 +41,7 @@ func (n noopAppender) UpdateMetadata(storage.SeriesRef, labels.Labels, metadata.
return 0, nil
}

func (n noopAppender) AppendCTZeroSample(ref prometheus_storage.SeriesRef, l labels.Labels, t, ct int64) (prometheus_storage.SeriesRef, error) {
func (n noopAppender) AppendCTZeroSample(_ storage.SeriesRef, _ labels.Labels, _, _ int64) (storage.SeriesRef, error) {
return 0, nil
}

Expand Down Expand Up @@ -124,6 +123,6 @@ func (c *capturingAppender) UpdateMetadata(storage.SeriesRef, labels.Labels, met
return 0, nil
}

func (c *capturingAppender) AppendCTZeroSample(ref prometheus_storage.SeriesRef, l labels.Labels, t, ct int64) (prometheus_storage.SeriesRef, error) {
func (c *capturingAppender) AppendCTZeroSample(_ storage.SeriesRef, _ labels.Labels, _, _ int64) (storage.SeriesRef, error) {
return 0, nil
}
2 changes: 1 addition & 1 deletion modules/generator/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (m *mockOverrides) MetricsGeneratorDisableCollection(string) bool {
return m.disableCollection
}

func (m *mockOverrides) MetricsGeneratorGenerateNativeHistograms(userID string) bool {
func (m *mockOverrides) MetricsGeneratorGenerateNativeHistograms(_ string) bool {
return false
}

Expand Down

0 comments on commit 9d33bdf

Please sign in to comment.