2021-08-12 19:03:24 +00:00
|
|
|
GOCMD=GO111MODULE=on go
|
|
|
|
|
|
|
|
linters-install:
|
|
|
|
@golangci-lint --version >/dev/null 2>&1 || { \
|
|
|
|
echo "installing linting tools..."; \
|
2021-09-10 12:42:14 +00:00
|
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.41.1; \
|
2021-08-12 19:03:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
lint: linters-install
|
|
|
|
golangci-lint run
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(GOCMD) test -cover -race ./...
|
|
|
|
|
|
|
|
bench:
|
|
|
|
$(GOCMD) test -bench=. -benchmem ./...
|
|
|
|
|
|
|
|
.PHONY: test lint linters-install
|