diff --git a/.travis.yml b/.travis.yml index f8684d9..4fb8698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,14 @@ go: - 1.2 - tip +go_import_path: github.com/google/gofuzz + +before_install: + - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1 + install: - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi script: - go test -cover + - golangci-lint run --tests=false diff --git a/fuzz.go b/fuzz.go index 1dfa80a..5319565 100644 --- a/fuzz.go +++ b/fuzz.go @@ -446,10 +446,7 @@ var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ // randBool returns true or false randomly. func randBool(r *rand.Rand) bool { - if r.Int()&1 == 1 { - return true - } - return false + return r.Int()&1 == 1 } type charRange struct {