diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 25f2e1f..f96f502 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -8,9 +8,8 @@ jobs: strategy: matrix: go-version: - - 1.17.x - - 1.18.x - 1.19.x + - 1.20.x name: run-tests runs-on: ubuntu-latest diff --git a/.golangci.yaml b/.golangci.yaml index 01252a5..c80ff33 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,7 +1,6 @@ linters: disable-all: true enable: - - depguard - gofumpt - goimports - gosimple diff --git a/go.mod b/go.mod index 65ba0a7..75bdc60 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/lyft/gostats -go 1.17 +go 1.18 require github.com/kelseyhightower/envconfig v1.4.0 diff --git a/mock/sink_test.go b/mock/sink_test.go index 085e128..d290f84 100644 --- a/mock/sink_test.go +++ b/mock/sink_test.go @@ -291,7 +291,7 @@ func TestSink_ThreadSafe(t *testing.T) { sink.AssertGaugeEquals(t, "name", uint64(1)) } -func TestSink_ThreadSafe_Reset(t *testing.T) { +func TestSink_ThreadSafe_Reset(_ *testing.T) { const N = 2000 sink := mock.NewSink() funcs := [...]func(){ diff --git a/mock_sink.go b/mock_sink.go index ee3b08b..e291b90 100644 --- a/mock_sink.go +++ b/mock_sink.go @@ -44,7 +44,7 @@ func (m *MockSink) FlushGauge(name string, value uint64) { } // FlushTimer satisfies the Sink interface. -func (m *MockSink) FlushTimer(name string, value float64) { +func (m *MockSink) FlushTimer(name string, value float64) { //nolint:revive m.tLock.Lock() defer m.tLock.Unlock() m.Timers[name]++ diff --git a/null_sink.go b/null_sink.go index dfd8be3..50669de 100644 --- a/null_sink.go +++ b/null_sink.go @@ -7,10 +7,10 @@ func NewNullSink() FlushableSink { return nullSink{} } -func (s nullSink) FlushCounter(name string, value uint64) {} +func (s nullSink) FlushCounter(name string, value uint64) {} //nolint:revive -func (s nullSink) FlushGauge(name string, value uint64) {} +func (s nullSink) FlushGauge(name string, value uint64) {} //nolint:revive -func (s nullSink) FlushTimer(name string, value float64) {} +func (s nullSink) FlushTimer(name string, value float64) {} //nolint:revive func (s nullSink) Flush() {} diff --git a/stats_test.go b/stats_test.go index 58b24fd..66ca14f 100644 --- a/stats_test.go +++ b/stats_test.go @@ -18,7 +18,7 @@ import ( ) // Ensure flushing and adding generators does not race -func TestStats(t *testing.T) { +func TestStats(_ *testing.T) { sink := &testStatSink{} store := NewStore(sink, true) @@ -46,7 +46,7 @@ func TestStats(t *testing.T) { // TestStatsStartContext ensures that a cancelled context cancels a // flushing goroutine. -func TestStatsStartContext(t *testing.T) { +func TestStatsStartContext(_ *testing.T) { sink := &testStatSink{} store := NewStore(sink, true)