代码拉取完成,页面将自动刷新
SHELL := /bin/bash
.PHONY: all check format vet build test generate tidy integration_test build-all
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " check to do static check"
@echo " build to create bin directory and build"
@echo " generate to generate code"
@echo " test to run test"
@echo " build-all to build all packages"
check: vet
format:
gofmt -w -l .
vet:
go vet ./...
generate:
go generate ./...
gofmt -w -l .
build: tidy generate format check
go build ./...
build-all:
for f in $$(find . -name go.mod); \
do make -C $$(dirname $$f) build; \
done
test:
go test -race -coverprofile=coverage.txt -covermode=atomic -v ./...
go tool cover -html="coverage.txt" -o "coverage.html"
test-all:
for f in $$(find . -name go.mod); \
do make -C $$(dirname $$f) test; \
done
tidy:
go mod tidy
go mod verify
tidy-all:
for f in $$(find . -name go.mod); \
do make -C $$(dirname $$f) tidy; \
done
clean:
find . -type f -name 'generated.go' -delete
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。