From 3cf6cedfe766358173d445b7287f8a7089782042 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sun, 20 Dec 2020 19:33:52 +0800 Subject: [PATCH] add go fmt --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2f6c9bd4e2..1ed395a4d5 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ endif GO_BUILD = $(GO) build GO_GET = $(GO) get GO_TEST = $(GO) test +GO_FMT = $(GO) fmt GO_BUILD_FLAGS = -v GO_BUILD_LDFLAGS = -X main.version=$(VERSION) @@ -67,8 +68,12 @@ deps: prepare license: clean prepareLic $(GO_LICENSE_CHECKER) -v -a -r -i vendor $(LICENSE_DIR)/license.txt . go && [[ -z `git status -s` ]] +.PHONY: fmt +fmt: clean prepareZk + $(GO_FMT) ./... && [[ -z `git status -s` ]] + .PHONY: verify -verify: clean license test +verify: clean fmt license test .PHONY: clean clean: prepare