Skip to content

Commit e358154

Browse files
committed
Add golint; run on latest only
1 parent f80869a commit e358154

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.circleci/config.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@ jobs:
1111
- checkout
1212
- run: go version
1313
- run: go get -t -v ./...
14-
- run: diff -u <(echo -n) <(gofmt -d .)
14+
# Only run gofmt, vet & lint against the latest Go version
15+
- run: >
16+
if [[ "$LATEST" = true ]]; then
17+
golint ./...
18+
fi
19+
- run: >
20+
if [[ "$LATEST" = true ]]; then
21+
diff -u <(echo -n) <(gofmt -d .)
22+
fi
23+
- run: >
24+
if [[ "$LATEST" = true ]]; then
25+
go vet -v .
26+
fi
1527
- run: if [[ "$LATEST" = true ]]; then go vet -v .; fi
1628
- run: go test -v -race ./...
1729

@@ -20,7 +32,6 @@ jobs:
2032
environment:
2133
LATEST: true
2234

23-
2435
"1.12":
2536
<<: *test
2637
docker:
@@ -51,7 +62,6 @@ jobs:
5162
docker:
5263
- image: circleci/golang:1.7
5364

54-
5565
workflows:
5666
version: 2
5767
build:

conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func TestWriteBufferPoolSync(t *testing.T) {
297297
// errorWriter is an io.Writer than returns an error on all writes.
298298
type errorWriter struct{}
299299

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

302302
// TestWriteBufferPoolError ensures that buffer is returned to pool after error
303303
// on write.

0 commit comments

Comments
 (0)