Add Makefile to make checks with vet and golint
This commit is contained in:
parent
f102654a22
commit
cc750494b3
1 changed files with 10 additions and 0 deletions
10
Makefile
Normal file
10
Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
.PHONY: fmt check
|
||||
|
||||
SRC = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
|
||||
fmt:
|
||||
@gofmt -s -l -w $(SRC)
|
||||
|
||||
check:
|
||||
@for i in $$(go list ./... | grep -v /vendor/); do golint $${i}; done
|
||||
@go tool vet ${SRC}
|
Loading…
Reference in a new issue