报错:

—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.

解决:

解决前,请先清理原有的版本

  1. brew install protobuf
  2. go get -u github.com/golang/protobuf/protoc-gen-go
  3. go install github.com/golang/protobuf/protoc-gen-go
  4. go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest