Skip to content

Commit

Permalink
Added gosimple
Browse files Browse the repository at this point in the history
Moved steps before actual `go test` in the before_script section
so that build fails early in case of errors found by staticcheck
and the like.
  • Loading branch information
kozlovic committed Jan 25, 2017
1 parent 6f34aa3 commit 7ba7a7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -9,10 +9,13 @@ install:
- go get github.com/mattn/goveralls
- go get github.com/wadey/gocovmerge
- go get honnef.co/go/tools/cmd/staticcheck
script:
- go get honnef.co/go/tools/cmd/gosimple
before_script:
- go fmt ./...
- go vet ./...
- gosimple ./...
- staticcheck ./...
script:
- go test -i -race ./...
- go test -v -race ./...
after_success:
Expand Down
4 changes: 2 additions & 2 deletions stan_test.go
Expand Up @@ -83,7 +83,7 @@ func stackFatalf(t tLogger, f string, args ...interface{}) {
// Generate the Stack of callers:
for i := 1; true; i++ {
_, file, line, ok := runtime.Caller(i)
if ok == false {
if !ok {
break
}
msg := fmt.Sprintf("%d - %s:%d", i, file, line)
Expand Down Expand Up @@ -677,7 +677,7 @@ func TestSubscriptionStartAtTime(t *testing.T) {
}

// Now test Ago helper
delta := time.Now().Sub(startTime)
delta := time.Since(startTime)

sub, err = sc.Subscribe("foo", mcb, StartAtTimeDelta(delta))
if err != nil {
Expand Down

0 comments on commit 7ba7a7e

Please sign in to comment.