Open chaozwn opened 2 months ago
maybe you can try with -I $external_path, goctl rpc protoc $proto ... -I $external_path --zrpc_out $dir --style=goZero --home $home -m
maybe you can try with -I $external_path,
goctl rpc protoc $proto ... -I $external_path --zrpc_out $dir --style=goZero --home $home -m
first this directive has no way of taking effect, and the external proto code is not compiled by default
Is your feature request related to a problem? Please describe. In some scenarios, we may need to perform automatic validation of rpc parameters. for example,
protovalidate-go
library is introduced to automatically validate req.Describe the solution you'd like
buf-cli
instead ofprotoc
to generate go files for grpc and proto. The following is my solution case.buf.gen.yaml
buf.yaml
In summary, we can get exactly the same grpc file and pb.go file with proto introduced.
But now there is a very fatal problem, I have import other proto files in proto early, resulting in the system's built-in generation function directly reported an error.
Describe alternatives you've considered
So I wonder if this syntax can be supported.
goctl rpc buf xx.proto --xxx
. If you are OK with my idea, I can try to submit a pr along these lines.Additional context Add any other context or screenshots about the feature request here.