-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lam Tran <[email protected]>
- Loading branch information
1 parent
171d18f
commit 46b90d7
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
COLOR := "\e[1;36m%s\e[0m\n" | ||
|
||
.PHONY: go-lint | ||
go-lint: | ||
.PHONY: golint | ||
golint: | ||
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && cd $$module && golangci-lint run ./... --fix); done | ||
|
||
.PHONY: go-generate | ||
go-generate: | ||
.PHONY: gogenerate | ||
gogenerate: | ||
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go generate -C $$module); done | ||
|
||
.PHONY: go-mod-download | ||
go-mod-download: | ||
.PHONY: gomoddownload | ||
gomoddownload: | ||
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go mod download -C $$module); done | ||
|
||
.PHONY: go-mod-tidy | ||
go-mod-tidy: | ||
.PHONY: gomodtidy | ||
gomodtidy: | ||
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go mod tidy -C $$module); done | ||
|
||
.PHONY: go-test | ||
go-test: | ||
.PHONY: gotest | ||
gotest: | ||
@for module in $$(go list -f '{{.Dir}}' -m | xargs); do (printf $(COLOR) $$module && go test -v -race $$module/...); done | ||
|
||
.PHONY: go-work-sync | ||
go-work-sync: | ||
.PHONY: goworksync | ||
goworksync: | ||
@go work sync |