Closed
Description
Env:
os: macos
protoc --version
libprotoc 3.12.3 // installed via brew
From sample code, why is the following not generating(UnimplementedGreeterServer is missing)?:
protoc --proto_path=. --go_out=plugins=grpc:. --go_opt=paths=source_relative helloworld.proto
// UnimplementedGreeterServer should be embedded to have forward compatible implementations.
type UnimplementedGreeterServer struct {
}
func (*UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented")
}
Also; from this example, there are bouth a pb.go
and a grpc.pb.go
file?
Error when including pb.UnimplementedGreeterServer
as it does not exist:
type server struct {
pb.UnimplementedGreeterServer
}
undefined: helloworld.UnimplementedGreeterServer