| 1 |
.PHONY: all profile test |
| 2 |
|
| 3 |
default: test |
| 4 |
|
| 5 |
all: test bench |
| 6 |
|
| 7 |
tools: |
| 8 |
go install github.com/fzipp/gocyclo/cmd/[email protected] |
| 9 |
|
| 10 |
bench: |
| 11 |
go test -bench=. -benchmem |
| 12 |
|
| 13 |
cyclo: |
| 14 |
gocyclo -over 13 ./*/*.go |
| 15 |
|
| 16 |
demo-list: |
| 17 |
go run cmd/demo-list/demo.go |
| 18 |
|
| 19 |
demo-progress: |
| 20 |
go run cmd/demo-progress/demo.go |
| 21 |
|
| 22 |
demo-table: |
| 23 |
go run cmd/demo-table/demo.go |
| 24 |
|
| 25 |
fmt: |
| 26 |
go fmt $(shell go list ./...) |
| 27 |
|
| 28 |
profile: |
| 29 |
sh profile.sh |
| 30 |
|
| 31 |
test: fmt vet cyclo |
| 32 |
go test -cover -coverprofile=.coverprofile $(shell go list ./...) |
| 33 |
|
| 34 |
test-race: |
| 35 |
go run -race ./cmd/demo-progress/demo.go |
| 36 |
|
| 37 |
vet: |
| 38 |
go vet $(shell go list ./...) |