-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
executable file
·29 lines (24 loc) · 932 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
all: setup get test
setup:
ln -s -f ../../.githooks/pre-commit.sh .git/hooks/pre-commit
test: lint
GO111MODULE=on go test -race -cover -coverprofile=cover-v2.out -count=5
cd ./v3/ && GO111MODULE=on go test -race -cover -coverprofile=cover-v3.out -count=5
cd ./v4/ && GO111MODULE=on go test -race -cover -coverprofile=cover-v4.out -count=5
lint:
GO111MODULE=on gofmt -s -l .
GO111MODULE=on goimports -l .
GO111MODULE=on go vet .
cd ./v3/ && GO111MODULE=on gofmt -s -l .
cd ./v3/ && GO111MODULE=on goimports -l .
cd ./v3/ && GO111MODULE=on go vet .
cd ./v4/ && GO111MODULE=on gofmt -s -l .
cd ./v4/ && GO111MODULE=on goimports -l .
cd ./v4/ && GO111MODULE=on go vet .
get:
go get -u -t golang.org/x/tools/cmd/goimports/...
go get -u github.com/golang/lint/golint
# go get -u honnef.co/go/tools/...
gen:
protoc --go_out=${GOPATH}/src --go-grpc_out=${GOPATH}/src v4/pb/private/test/test.proto
goimports -w ./v4/pb/