- 生成的server与client端代码都在一个*.pb.go文件中
protoc --go_out=plugins=grpc:. helloworld.proto
- 分两步,第一步生成helloworld.pb.go 不包含grpc服务,第二部生成helloworld_grpc.pb.go
protoc --go_out=. helloworld.proto protoc --plugin=protoc-gen-go=C:\Users\v_vwzyao\go\bin\protoc-gen-go-grpc.exe --go_out . .\helloworld.proto
go grpc微服务生成*.pb.go与*_grpc.pb.go
最新推荐文章于 2024-05-11 18:48:20 发布