2019-07-17 22:25:42 +00:00
|
|
|
GOCMD=go
|
|
|
|
|
|
|
|
linters-install:
|
2020-01-15 07:25:09 +00:00
|
|
|
@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.19.1; \
|
|
|
|
}
|
2019-07-17 22:25:42 +00:00
|
|
|
|
|
|
|
lint: linters-install
|
2020-01-15 07:25:09 +00:00
|
|
|
golangci-lint run
|
2019-07-17 22:25:42 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
$(GOCMD) test -cover -race ./...
|
|
|
|
|
|
|
|
bench:
|
|
|
|
$(GOCMD) test -bench=. -benchmem ./...
|
|
|
|
|
|
|
|
.PHONY: test lint linters-install
|