I followed the gRPC quickstart document in this link https://grpc.io/docs/languages/go/quickstart/ and while regenerating the gRPC code i am getting error ( Unknown flag: --go_opt) as shown below. Tried all the options but not working. It also gives ( Unknown flag: --go-grpc_opt) error.
Command -
$ protoc \
--go_out=Mgrpc/service_config/service_config.proto=/internal/proto/grpc_service_config:. \
--go-grpc_out=Mgrpc/service_config/service_config.proto=/internal/proto/grpc_service_config:. \
--go-grpc_opt=paths=source_relative \
helloworld/helloworld.proto
Error - Unknown flag: --go_opt
protoc-gen-go
orprotoc-gen-go-grpc
binary is present in your PATH? – Lambart$ export PATH="$PATH:$(go env GOPATH)/bin"
which adds GOPATH/bin to your PATH. When you dogo install
binary will be in your PATH. You can. verify if binary is on your path by usingwhich
command. ie:which protoc-gen-go
– Lambart