| 1 |
all: lint test |
| 2 |
|
| 3 |
prepare: |
| 4 |
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0 |
| 5 |
|
| 6 |
build: |
| 7 |
@go build -v ./... |
| 8 |
|
| 9 |
test: |
| 10 |
@go test -cover -v ./... |
| 11 |
|
| 12 |
cover: |
| 13 |
@go test -race -coverprofile=coverage.txt -coverpkg=./... ./... |
| 14 |
@go tool cover -html=coverage.txt -o coverage.html |
| 15 |
|
| 16 |
lint: |
| 17 |
golangci-lint --timeout=5m0s run -v ./... |
| 18 |
|
| 19 |
bench: |
| 20 |
go test -benchmem -count 100 -bench . |
| 21 |
|
| 22 |
mod: |
| 23 |
go mod tidy && go mod vendor |