You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
492 B

  1. # note: call scripts from /scripts
  2. GOCMD=GO111MODULE=on go
  3. LOCALCMD=/usr/local
  4. linters-install:
  5. @golangci-lint --version >/dev/null 2>&1 || { \
  6. echo "installing linting tools..."; \
  7. curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
  8. }
  9. lint: linters-install
  10. $(LOCALCMD)/bin/golangci-lint run
  11. fmt:
  12. $(GOCMD) fmt ./...
  13. vet:
  14. $(GOCMD) vet ./.
  15. test:
  16. $(GOCMD) test -cover -race ./...
  17. bench:
  18. $(GOCMD) test -bench=. -benchmem ./...