When generating RPC code using proto file template in GoLang, one may face the issue like below when running the command protoc
.
Error: exit status 1
Output: --go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC
See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information.
Normally this issue is caused because the version of protoc-gen-go
being used is not correct. One way to fix the issue is to follow the instructions provided by Google to run a new command.
Another way to fix this is by having the Github version of protoc-gen-go which does support the plugin, to install that, run below command.
go get github.com/golang/protobuf/protoc-gen-go
After this, above issue should be fixed.