diff --git a/.gitignore b/.gitignore index 76085a7b..f766658d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ dist *.swp *.swo +/coverage.out \ No newline at end of file diff --git a/Makefile b/Makefile index 3c19c02e..cfc07265 100644 --- a/Makefile +++ b/Makefile @@ -63,5 +63,9 @@ misspell: vet: go vet $(MODULE)/... +COVERAGE_FILE := coverage.out test: - go test $(MODULE)/... + go test -coverprofile=$(COVERAGE_FILE) $(MODULE)/... + +coverage: test + go tool cover -func=$(COVERAGE_FILE)