Skip to content

Commit

Permalink
feat: add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
wujunze committed Mar 8, 2021
1 parent 22a170c commit 45c4543
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: build

VETPACKAGES=`go list ./... | grep -v /vendor/ | grep -v /examples/`
GOFILES=`find . -name "*.go" -type f -not -path "./vendor/*"`

gofmt:
echo "正在使用gofmt格式化文件..."
gofmt -s -w ${GOFILES}
echo "格式化完成"
govet:
echo "正在进行静态检测..."
go vet $(VETPACKAGES)

0 comments on commit 45c4543

Please sign in to comment.