作者:冷向泽 | 来源:互联网 | 2023-02-11 13:05
https://github.com/golang/protobuf
protoc-gen-go
是protoc中的插件,它为输入原型定义生成go绑定.
protoc-gen-go
还有一个插件框架,它grpc
是一个插件插件
https://github.com/golang/protobuf/tree/master/protoc-gen-go/grpc
$ protoc ./helloworld.proto --go_out=plugins=grpc:.
我可以编写自己的插件并将其与grpc插件一起调用吗?
$ protoc ./helloworld.proto --go_out=plugins=grpc+myplugin:.
我是否需要强制将我的插件构建到protoc-gen-go中?如果没有,那么protoc-gen-go将如何找到myplugin?