Skip to content

Commit

Permalink
refactor: update Makefile (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Lam Tran <[email protected]>
  • Loading branch information
tranngoclam authored Oct 31, 2023
1 parent 171d18f commit 46b90d7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
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

0 comments on commit 46b90d7

Please sign in to comment.