-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 884 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.PHONY: code
code: fmt gofumpt
.PHONY: fmt
fmt:
for file in $$(find . -name "*.go"); do go fmt "$${file}"; done
.PHONY: gofumpt
gofumpt:
gofumpt -w .
gofumpt -w ./cst/
gofumpt -w ./status/
.PHONY: all
all: mod-tidy fmt gofumpt test example-test-coverage
.PHONY: mod-tidy
mod-tidy:
go mod tidy
.PHONY: install
install:
go install mvdan.cc/gofumpt@latest
.PHONY: test
test:
@go test -v
.PHONY: example-run
example-run:
@cd _examples;go run .
.PHONY: example-test-coverage
example-test-coverage:
@cd _examples/all;go test -v -coverprofile=.coverage.out -coverpkg=github.com/cd365/hey/v7;go tool cover -html=.coverage.out -o .coverage.html;cd -
.PHONY: example-test-coverage-all
example-test-coverage-all:
@cd _examples/all;go test -v -coverprofile=.coverage.out -coverpkg=github.com/cd365/hey/v7,examples/pgsql;go tool cover -html=.coverage.out -o .coverage.html;cd -