-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (44 loc) · 1006 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: test_cover
test_cover:
@go test -timeout=1s -v -race -cover -coverprofile=out.out ./...
.PHONY: test
test:test_cover
@echo "\n"
@go tool cover -func=out.out
.PHONY: test_html
test_html:test_cover
@echo "\n"
@go tool cover -html=out.out
.PHONY: test_bench
test_bench:
@go test -bench=. -benchmem ./
.PHONY: rm_test
rm_test:
@rm -f *.out
@rm -f *.test
.PHONY: test_profile
test_profile:
@go test -bench=. -benchmem -memprofile memprofile.out -cpuprofile profile.out xerror_test.go
@go tool pprof -http=":8081" profile.out
.PHONY: build
build:
@go build -o main cmd/main.go
./main xtest.go
.PHONY: protobuf
protobuf:
protobuild vendor
protobuild gen
vet:
go vet ./...
refactor:
gofumpt -l -w -extra .
install-protoc:
go install -v ./cmds/protoc-gen-cloudjobs
go install -v ./cmds/protoc-gen-go-errors
lint:
golangci-lint run \
--out-format=colored-line-number \
--timeout=10m --new-from-rev=HEAD~1 \
--config=./.golangci.yml \
--verbose \
--print-issued-lines