can not use $ goctl rpc proto -src transform.proto -dir .
xiao-jay opened this issue · 2 comments
xiao-jay commented
https://go-zero.dev/cn/shorturl.html ,the titile is 6. 编写 transform rpc 服务
when i use goctl rpc proto -src transform.proto -dir .
get the result No help topic for 'proto'
so i read the docs and found correct command
$ goctl rpc protoc transform.proto --go_out=. --go-grpc_out=. --zrpc_out=.
but i get
➜goctl rpc protoc transform.proto --go-grpc_out . --go_out . --zrpc_out .
protoc-gen-go-grpc: unable to determine Go import path for "transform.proto"
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.
please teach me how to use goctl rpc protoc transform.proto
thank you
kevwan commented
Use the code like below:
option go_package="./user";
xiao-jay commented
this is worked for me,thank you kevwan