| 1 |
.PHONY: bench realclean cover viewcover test lint imports |
| 2 |
|
| 3 |
bench: |
| 4 |
go test -tags bench -benchmem -bench . |
| 5 |
@git checkout go.mod |
| 6 |
@rm go.sum |
| 7 |
|
| 8 |
realclean: |
| 9 |
rm coverage.out |
| 10 |
|
| 11 |
test: |
| 12 |
go test -v -race ./... |
| 13 |
|
| 14 |
cover: |
| 15 |
ifeq ($(strip $(STRFTIME_TAGS)),) |
| 16 |
go test -v -race -coverpkg=./... -coverprofile=coverage.out ./... |
| 17 |
else |
| 18 |
go test -v -tags $(STRFTIME_TAGS) -race -coverpkg=./... -coverprofile=coverage.out ./... |
| 19 |
endif |
| 20 |
|
| 21 |
viewcover: |
| 22 |
go tool cover -html=coverage.out |
| 23 |
|
| 24 |
lint: |
| 25 |
golangci-lint run ./... |
| 26 |
|
| 27 |
imports: |
| 28 |
goimports -w ./ |
| 29 |
|