1language: go 2sudo: false 3go: 4- 1.7 5- 1.8 6- 1.9 7- '1.10' 8- 1.11.x 9- master 10 11install: 12- go get github.com/pkg/errors 13# golint is no longer available for go versions 1.7 and 1.8 14- | 15 INSTALLED_GO_VERSION=`go version | sed 's/go version go\(.*\) .*/\1/'` 16 echo $INSTALLED_GO_VERSION 17 if [ "$INSTALLED_GO_VERSION" != "1.7" ] && [ "$INSTALLED_GO_VERSION" != "1.8" ]; then 18 go get golang.org/x/lint/golint 19 fi 20 21before_script: 22- | 23 which golint; 24 if [ $? == 0 ]; then 25 golint ./... 26 fi 27 go vet 28 29script: 30- go test -v -race -coverprofile=coverage.txt -covermode=atomic 31 32after_success: 33- bash <(curl -s https://codecov.io/bash) 34