1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
PACKAGES = $(shell go list ./... | grep -v '/vendor/')
default: test
test-all: vet lint test test-race
test:
go test -v -parallel=4 ${PACKAGES}
test-race:
go test -v -race ${PACKAGES}
vet:
go vet ${PACKAGES}
lint:
@go get github.com/golang/lint/golint
go list ./... | grep -v vendor | xargs -n1 golint
cover:
@go get golang.org/x/tools/cmd/cover
go test -coverprofile=cover.out
go tool cover -html cover.out
rm cover.out
.PHONY: test test-race vet lint cover
|