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