Closed bootun closed 2 years ago
both version of protoc
support protc --go_out=xxx --go-grpc_out=xxx
, but if we uses golang/protobuf
, we need install protoc-gen-go-grpc
to supports the separate flag expression.
golang/protobuf
, he only needs to install two executables protoc
and protoc-gen-go
, then he can use the proto-gen-go
plugin to generate gRPC and Protocol Buffer code.protoc
, protoc-gen-go
and protoc-gen-go-grpc
which grammar should we adapt to?
this project uses golang/protobuf to generate code(this repository are deprecated), the gRPC code generator is built-in in, so it supports the expression
protoc --go_out=plugins=grpc:.
, but when we want to use the new version ofprotoc-gen-go
, they are two separate files and not supportplugin=xxx
mechanism. if we want to generate code, we need to use some separate flags like this:but
golang/protobuf
is not supporting this expression, as far as I know, many people still usegolang/protobuf
as their code generator, so which version should be chosen for this project?resource