2023-02-25 17:09:09 +00:00
|
|
|
.PHONY: all test-color lint format build clean
|
2022-07-22 14:07:02 +00:00
|
|
|
|
2023-02-25 16:07:58 +00:00
|
|
|
all:
|
2023-02-25 16:23:31 +00:00
|
|
|
go mod tidy
|
2023-12-20 20:22:12 +00:00
|
|
|
$(MAKE) format
|
2023-02-25 16:07:58 +00:00
|
|
|
$(MAKE) test-color
|
|
|
|
$(MAKE) lint
|
2023-02-25 16:14:43 +00:00
|
|
|
$(MAKE) build
|
|
|
|
$(MAKE) clean
|
2022-07-22 14:07:02 +00:00
|
|
|
|
|
|
|
test-color:
|
2024-03-21 08:00:05 +00:00
|
|
|
# go install github.com/haunt98/go-test-color@latest
|
2022-07-22 14:07:02 +00:00
|
|
|
go-test-color -race -failfast ./...
|
|
|
|
|
|
|
|
lint:
|
|
|
|
golangci-lint run ./...
|
2023-02-25 16:14:43 +00:00
|
|
|
|
|
|
|
format:
|
2024-03-21 08:00:05 +00:00
|
|
|
# go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
|
|
|
# go install mvdan.cc/gofumpt@latest
|
2023-02-25 16:14:43 +00:00
|
|
|
gofimports -w --company github.com/make-go-great,github.com/haunt98 .
|
|
|
|
gofumpt -w -extra .
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(MAKE) clean
|
|
|
|
go build ./cmd/update-go-mod
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf update-go-mod
|