Makefile 389 B

123456789101112131415161718
  1. GOCMD=go
  2. linters-install:
  3. @golangci-lint --version >/dev/null 2>&1 || { \
  4. echo "installing linting tools..."; \
  5. curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.19.1; \
  6. }
  7. lint: linters-install
  8. golangci-lint run
  9. test:
  10. $(GOCMD) test -cover -race ./...
  11. bench:
  12. $(GOCMD) test -bench=. -benchmem ./...
  13. .PHONY: test lint linters-install