File tree Expand file tree Collapse file tree 6 files changed +27
-15
lines changed Expand file tree Collapse file tree 6 files changed +27
-15
lines changed Original file line number Diff line number Diff line change 15
15
# Dependency directories (remove the comment below to include it)
16
16
# vendor/
17
17
18
+ .idea /
Original file line number Diff line number Diff line change @@ -20,11 +20,10 @@ ifeq ($(UNAME), Linux)
20
20
export PATH="$${PATH}:$${HOME}/.local/bin"
21
21
endif
22
22
endif
23
- # ifeq ($(PROTOC_GEN_GO),)
24
- # (go mod download && grep _ ./cmd/tools.go | cut -d' ' -f2 | xargs go install)
25
- (go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest && go install google.golang.org/protobuf/cmd/protoc-gen-go@latest)
26
- # endif
27
-
23
+ ifeq ($(PROTOC_GEN_GO ) ,)
24
+ go mod download && grep _ ./cmd/tools/tools.go | cut -d' ' -f2 | xargs go install -v
25
+ endif
26
+
28
27
all :
29
28
mkdir -p ./pkg/pbs/
30
29
protoc \
34
33
--go-grpc_out=. \
35
34
--go-grpc_opt=paths=source_relative \
36
35
$(PROTO_FILES )
37
-
36
+
38
37
clean :
39
- rm -rf ./pkg/pbs/* .pb.go
38
+ rm -rf ./pkg/pbs/* .pb.go
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // +build tools
2
+
3
+ // tools is a special package to capture the following packages into `go.mod`.
4
+ //
5
+ // These tools are used to generate Go files from Protocol Buffers.
6
+ // But, these tools are not used directly in the code.
7
+ // That's why we're capturing the packages in this file.
8
+ //
9
+ // Then, the following command will always install the same versions defined in `go.mod`.
10
+ //
11
+ // go install google.golang.org/grpc/cmd/protoc-gen-go-grpc google.golang.org/protobuf/cmd/protoc-gen-go
12
+ package tools
13
+
14
+ import (
15
+ _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
16
+ _ "google.golang.org/protobuf/cmd/protoc-gen-go"
17
+ )
Original file line number Diff line number Diff line change 4
4
5
5
require (
6
6
google.golang.org/grpc v1.38.0
7
+ google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
7
8
google.golang.org/protobuf v1.26.0
8
9
)
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ
70
70
google.golang.org/grpc v1.27.0 /go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk =
71
71
google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0 =
72
72
google.golang.org/grpc v1.38.0 /go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM =
73
+ google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE =
74
+ google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 /go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw =
73
75
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd /go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8 =
74
76
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64 /go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0 =
75
77
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60 /go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM =
You can’t perform that action at this time.
0 commit comments