2024-05-15 19:09:45 +08:00
|
|
|
GOCMD=go
|
2023-12-21 22:17:40 +08:00
|
|
|
|
|
|
|
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.41.1; \
|
|
|
|
}
|
|
|
|
|
|
|
|
lint: linters-install
|
|
|
|
golangci-lint run
|
|
|
|
|
|
|
|
test:
|
|
|
|
$(GOCMD) test -cover -race ./...
|
|
|
|
|
|
|
|
bench:
|
2024-05-15 19:09:45 +08:00
|
|
|
$(GOCMD) test -run=NONE -bench=. -benchmem ./...
|
2023-12-21 22:17:40 +08:00
|
|
|
|
2024-05-15 19:09:45 +08:00
|
|
|
.PHONY: test lint linters-install
|