Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go:
- master

install:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v2.15.0/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.15.0

script:
- go test -v -race -timeout=10s ./...
Expand Down
11 changes: 6 additions & 5 deletions statsd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"io"
"io/ioutil"
"net"
"sync"
"testing"
Expand Down Expand Up @@ -203,7 +202,9 @@ func TestOddTagsArgs(t *testing.T) {
}
}()

_, _ = New(TagsFormat(InfluxDB), Tags("tag1"))
oddTags := []string{"tag1"}
//nolint:staticcheck // The odd tag count is the behavior under test.
_, _ = New(TagsFormat(InfluxDB), Tags(oddTags...))
t.Fatal("A panic should occur")
}

Expand Down Expand Up @@ -519,14 +520,14 @@ func newServer(t testing.TB, network, addr string, f func([]byte)) *server {
s.closed <- true
return
}
p, err := ioutil.ReadAll(conn)
if err != nil {
var p bytes.Buffer
if _, err := io.Copy(&p, conn); err != nil {
t.Fatal(err)
}
if err := conn.Close(); err != nil {
t.Fatal(err)
}
f(p)
f(p.Bytes())
}
}()
default:
Expand Down
Loading