3 LATEST_STABLE_SUPPORTED_GO_VERSION="1.11"
6 if local_go_version_is_latest_stable
15 local_go_version_is_latest_stable() {
16 go version | grep -q $LATEST_STABLE_SUPPORTED_GO_VERSION
24 GOFMT_FILES=$(gofmt -l .)
25 if [ -n "$GOFMT_FILES" ]
27 log_error "gofmt failed for the following files:
30 please run 'gofmt -w .' on your changes before committing."
36 GOLINT_ERRORS=$(golint ./... | grep -v "Id should be")
37 if [ -n "$GOLINT_ERRORS" ]
39 log_error "golint failed for the following reasons:
42 please run 'golint ./...' on your changes before committing."
48 GOVET_ERRORS=$(go tool vet ./*.go 2>&1)
49 if [ -n "$GOVET_ERRORS" ]
51 log_error "go vet failed for the following reasons:
54 please run 'go tool vet ./*.go' on your changes before committing."
62 log_error 'Running short tests...'
63 env AMQP_URL= go test -short