7
0
id-validator/Makefile
2021-01-25 17:06:49 +08:00

25 lignes
492 B
Makefile

# note: call scripts from /scripts
GOCMD=GO111MODULE=on go
LOCALCMD=/usr/local
linters-install:
@golangci-lint --version >/dev/null 2>&1 || { \
echo "installing linting tools..."; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
}
lint: linters-install
$(LOCALCMD)/bin/golangci-lint run
fmt:
$(GOCMD) fmt ./...
vet:
$(GOCMD) vet ./.
test:
$(GOCMD) test -cover -race ./...
bench:
$(GOCMD) test -bench=. -benchmem ./...