2022-12-30 09:32:52 +00:00
|
|
|
.PHONY: all test test-color coverage coverage-cli coverage-html lint format gen format-html
|
2022-07-12 06:57:31 +00:00
|
|
|
|
2022-12-30 09:32:52 +00:00
|
|
|
all: test-color lint format gen format-html
|
2022-12-25 19:18:02 +00:00
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
test:
|
|
|
|
go test -race -failfast ./...
|
|
|
|
|
|
|
|
test-color:
|
|
|
|
go install github.com/haunt98/go-test-color@latest
|
|
|
|
go-test-color -race -failfast ./...
|
|
|
|
|
|
|
|
coverage:
|
|
|
|
go test -coverprofile=coverage.out ./...
|
|
|
|
|
|
|
|
coverage-cli: coverage
|
|
|
|
go tool cover -func=coverage.out
|
|
|
|
|
|
|
|
coverage-html: coverage
|
|
|
|
go tool cover -html=coverage.out
|
|
|
|
|
|
|
|
lint:
|
|
|
|
golangci-lint run ./...
|
|
|
|
|
|
|
|
format:
|
|
|
|
go install github.com/haunt98/gofimports/cmd/gofimports@latest
|
|
|
|
go install mvdan.cc/gofumpt@latest
|
|
|
|
gofimports -w -company github.com/make-go-great .
|
|
|
|
gofumpt -w -extra .
|
2022-07-12 06:57:31 +00:00
|
|
|
|
|
|
|
gen:
|
|
|
|
go run .
|
2022-12-30 09:32:52 +00:00
|
|
|
|
|
|
|
format-html:
|
|
|
|
yarn prettier --write .
|