-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
25 lines (22 loc) · 927 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
# hello world demo
gen-hello-world:
protoc --proto_path=./helloworld/helloworld \
--go_out=./helloworld/helloworld --go_opt=paths=source_relative \
--go-grpc_out=./helloworld/helloworld --go-grpc_opt=paths=source_relative \
./helloworld/helloworld/hello_world.proto
# echo demo
gen-echo:
protoc --proto_path=./features/proto \
--go_out=./features/proto --go_opt=paths=source_relative \
--go-grpc_out=./features/proto --go-grpc_opt=paths=source_relative \
./features/proto/echo/echo.proto
# grpc-gateway demo
gen-gw:
protoc --proto_path=./features/proto \
--go_out=./features/proto --go_opt=paths=source_relative \
--go-grpc_out=./features/proto --go-grpc_opt=paths=source_relative \
--grpc-gateway_out=./features/proto --grpc-gateway_opt=paths=source_relative \
./features/proto/gateway/gateway.proto
# proto import demo
gen-imp:
protoc --proto_path=. --go_out=. ./protobuf/import/*.proto