newbie here.
Currently learning how grpc works and was going through the tutorial in this link
https://grpc.io/docs/quickstart/go.html#update-and-run-the-application
When I ran the example using the helloworld.pb.go
file provided, it works. But when I deleted that file and ran protoc --go_out=plugins=grpc:. *.proto
to generate the that file again, I find that I can no longer run the greeter server.
The error I am getting is
google.golang.org/grpc/examples/helloworld/helloworld helloworld/helloworld.pb.go:105:11: cannot use _Greeter_SayHello_Handler (type func(interface {}, "context".Context, grpc.Codec, []byte) (interface {}, error)) as type grpc.methodHandler in field value
Tried to google but couldn't find out why. My protobuf version is 3.5.1 and the grpc is freshly cloned from github.com/golang/protobuf/protoc-gen-go
Generate proto like this
file_name : Your proto file name with the path
//To generate the grpc code
protoc proto/file_name.proto --go_out=plugins=grpc:.
Take a look this link How to write proto and generate the proto file. It may help your problem