Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target only upstream supported versions of Go #159

Merged
merged 3 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
linters:
disable-all: true
enable:
- depguard
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depguard was reporting erroneous results and, without configuration, doesn't provide much value. I'm choosing to remove it instead of figuring out what caused it to break.

- gofumpt
- goimports
- gosimple
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/lyft/gostats

go 1.17
go 1.18

require github.com/kelseyhightower/envconfig v1.4.0
2 changes: 1 addition & 1 deletion mock/sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down
2 changes: 1 addition & 1 deletion mock_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]++
Expand Down
6 changes: 3 additions & 3 deletions null_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
4 changes: 2 additions & 2 deletions stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down