-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (32 loc) · 1.01 KB
/
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
up:
docker-compose up
test:
go test -parallel 20 ./...
test_v:
go test -parallel 20 -v ./...
test_short:
go test -parallel 20 ./... -short
test_race:
go test ./... -short -race
test_stress:
go test -tags=stress -parallel 30 -timeout=45m ./...
test_reconnect:
go test -tags=reconnect ./...
test_exactlyonce:
go test -tags=exactlyonce ./...
BENCHCNT := 5
bench:
go test -bench=. -count $(BENCHCNT) -run=^# ./...
fmt:
gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")
[ "`gofmt -l $$(find . -type f -name '*.go'| grep -v "/vendor/")`" = "" ]
vet:
go vet ./...
lint:
@if which golangci-lint >/dev/null ; then golangci-lint run --config .golangci.yml ; else echo "WARNING: go linter not installed. To install, run\n curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b \$$(go env GOPATH)/bin v1.42.1"; fi
check: fmt vet lint
update_watermill:
go get -u github.com/ThreeDotsLabs/watermill
go mod tidy
sed -i '\|go 1\.|d' go.mod
go mod edit -fmt