Merge pull request #426 from nats-io/add_gosimple

Added gosimple
This commit is contained in:
Derek Collison
2017-01-26 09:45:30 -08:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -7,13 +7,16 @@ install:
- go get github.com/nats-io/go-nats
- go get github.com/mattn/goveralls
- go get github.com/wadey/gocovmerge
- go get honnef.co/go/staticcheck/cmd/staticcheck
script:
- go get honnef.co/go/tools/cmd/staticcheck
- go get honnef.co/go/tools/cmd/gosimple
before_script:
- EXCLUDE_VENDOR=$(go list ./... | grep -v "/vendor/")
- go build
- go fmt ./...
- go vet $EXCLUDE_VENDOR
- gosimple $EXCLUDE_VENDOR
- staticcheck -ignore "$(cat staticcheck.ignore)" $EXCLUDE_VENDOR
script:
- go test -i -race $EXCLUDE_VENDOR
- go test -v -race $EXCLUDE_VENDOR
after_success:

View File

@@ -308,7 +308,7 @@ func TestWriteDeadline(t *testing.T) {
t.Fatalf("Error on publish: %v", err)
}
}
dur := time.Now().Sub(start)
dur := time.Since(start)
// user more than the write deadline to account for calls
// overhead, running with -race, etc...
if dur > 100*time.Millisecond {

View File

@@ -636,8 +636,5 @@ func matchLiteral(literal, subject string) bool {
li++
}
// Make sure we have processed all of the literal's chars..
if li < ll {
return false
}
return true
return li >= ll
}