Makefile 333 B

1234567891011121314151617181920212223
  1. .DEFAULT_GOAL := test
  2. .PHONY: test
  3. test:
  4. go test -v -race -cover ./...
  5. .PHONY: bench
  6. bench:
  7. go test -v -run - -bench . -benchmem ./...
  8. .PHONY: lint
  9. lint:
  10. # Ignore grep's exit code since no match returns 1.
  11. echo 'linting...' ; golint ./...
  12. .PHONY: vet
  13. vet:
  14. go vet ./...
  15. .PHONY: all
  16. all: vet lint test bench
  17. .PHONY: example