blob: 77601b5a308ea7587a661f878f9bb561ce55cc44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
pkgs := $(shell go list ./...)
.PHONY: help lint test clean
ifdef GOPATH
GO111MODULE=on
endif
test: ## Run tests with coverage
go test -short -cover -coverprofile coverage.out $(pkgs)
go tool cover -html=coverage.out -o coverage.html
lint:
golint $(pkgs)
clean: ## Clean all test files
rm -rf coverage*
help: ## This help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort |awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|