
gRpc HelloWorld#
helloWorld#
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
helloworld/helloworld.protoMacOS下问题#
- 原本
protobuf中没有mac的gen-go和gen-go-grpc,所以需要额外运行安装. - 除了使用brew用
go get应该也是可以的,就是有路径问题,所以还是使用brew吧
brew install protobuf
brew install protoc-gen-go
brew install protoc-gen-go-grpc