3 Star 1 Fork 1

Gitee 极速下载 / Go-Cast

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/spf13/cast
克隆/下载
Makefile 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
GOVERSION := $(shell go version | cut -d ' ' -f 3 | cut -d '.' -f 2)
.PHONY: check fmt lint test test-race vet test-cover-html help
.DEFAULT_GOAL := help
check: test-race fmt vet lint ## Run tests and linters
test: ## Run tests
go test ./...
test-race: ## Run tests with race detector
go test -race ./...
fmt: ## Run gofmt linter
ifeq "$(GOVERSION)" "12"
@for d in `go list` ; do \
if [ "`gofmt -l -s $$GOPATH/src/$$d | tee /dev/stderr`" ]; then \
echo "^ improperly formatted go files" && echo && exit 1; \
fi \
done
endif
lint: ## Run golint linter
@for d in `go list` ; do \
if [ "`golint $$d | tee /dev/stderr`" ]; then \
echo "^ golint errors!" && echo && exit 1; \
fi \
done
vet: ## Run go vet linter
@if [ "`go vet | tee /dev/stderr`" ]; then \
echo "^ go vet errors!" && echo && exit 1; \
fi
test-cover-html: ## Generate test coverage report
go test -coverprofile=coverage.out -covermode=count
go tool cover -func=coverage.out
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
1
https://gitee.com/mirrors/Go-Cast.git
git@gitee.com:mirrors/Go-Cast.git
mirrors
Go-Cast
Go-Cast
master

搜索帮助