forked from d3mondev/resolvermt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (23 loc) · 746 Bytes
/
Makefile
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
27
28
29
30
31
32
33
PKG_LIST := $(shell go list ./... | grep -v /vendor/)
.SILENT: ;
.PHONY: all
all: build
lint: ## Lint the files
golint -set_exit_status $(PKG_LIST)
test: ## Run unit tests
go fmt $(PKG_LIST)
go vet $(PKG_LIST)
go test -race -timeout 30s -cover -v -count 1 $(PKG_LIST)
bench: ## Run benchmark
go test -bench . $(PKG_LIST)
msan: ## Run memory sanitizer
go test -msan $(PKG_LIST)
build: ## Build the binary file
go build -v $(PKG_LIST)
cover: ## Code coverage
go test -coverprofile=cover.out $(PKG_LIST)
clean: ## Remove previous build
rm -f cover.out
go clean
help: ## Display this help screen
grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'