diff --git a/Makefile b/Makefile index fe17468..e4141f9 100644 --- a/Makefile +++ b/Makefile @@ -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