Skip to content

Commit

Permalink
Add golint; run on latest only
Browse files Browse the repository at this point in the history
  • Loading branch information
elithrar committed Jun 29, 2019
1 parent f80869a commit e358154
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .circleci/config.yml
Expand Up @@ -11,7 +11,19 @@ jobs:
- checkout
- run: go version
- run: go get -t -v ./...
- run: diff -u <(echo -n) <(gofmt -d .)
# Only run gofmt, vet & lint against the latest Go version
- run: >
if [[ "$LATEST" = true ]]; then
golint ./...
fi
- run: >
if [[ "$LATEST" = true ]]; then
diff -u <(echo -n) <(gofmt -d .)
fi
- run: >
if [[ "$LATEST" = true ]]; then
go vet -v .
fi
- run: if [[ "$LATEST" = true ]]; then go vet -v .; fi
- run: go test -v -race ./...

Expand All @@ -20,7 +32,6 @@ jobs:
environment:
LATEST: true


"1.12":
<<: *test
docker:
Expand Down Expand Up @@ -51,7 +62,6 @@ jobs:
docker:
- image: circleci/golang:1.7


workflows:
version: 2
build:
Expand Down
2 changes: 1 addition & 1 deletion conn_test.go
Expand Up @@ -297,7 +297,7 @@ func TestWriteBufferPoolSync(t *testing.T) {
// errorWriter is an io.Writer than returns an error on all writes.
type errorWriter struct{}

func (ew errorWriter) Write(p []byte) (int, error) { return 0, errors.New("Error!") }
func (ew errorWriter) Write(p []byte) (int, error) { return 0, errors.New("error") }

// TestWriteBufferPoolError ensures that buffer is returned to pool after error
// on write.
Expand Down

0 comments on commit e358154

Please sign in to comment.