-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (26 loc) · 616 Bytes
/
Makefile
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
BENCHTIME ?= 10s
STRINGER := .local/bin/stringer
URFAVE_ARGH_TRACING ?= off
export URFAVE_ARGH_TRACING
.PHONY: all
all: generate test
.PHONY: clean
clean:
rm -f coverage.out
.PHONY: distclean
distclean: clean
rm -f $(STRINGER)
.PHONY: generate
generate: $(STRINGER)
PATH=$(PWD)/.local/bin:$(PATH) go generate ./...
.PHONY: test
test:
go test -v -coverprofile=coverage.out ./...
.PHONY: bench
bench:
go test -v -bench . -benchtime $(BENCHTIME) ./...
.PHONY: show-cover
show-cover:
go tool cover -func=coverage.out
$(STRINGER):
GOBIN=$(PWD)/.local/bin go install golang.org/x/tools/cmd/stringer@latest