diff --git a/Makefile b/Makefile index 7ea72d97f..fdb9ab3d6 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,14 @@ updatedeps: | sort -u \ | xargs go get -f -u -v +cover: + @go tool cover 2>/dev/null; if [ $$? -eq 3 ]; then \ + go get -u golang.org/x/tools/cmd/cover; \ + fi + go test $(TEST) -coverprofile=coverage.out + go tool cover -html=coverage.out + rm coverage.out + # vet runs the Go source code static analysis tool `vet` to find # any common errors. vet: