简体   繁体   中英

generate proto file to Protocol Buffer not found method RegisterGCDServiceServer in pb.go file

golnag version 1.15.3 not found method RegisterGCDServiceServer in pb.go file

syntax = "proto3";

package pb;

message GCDRequest {
  uint64 a = 1;
  uint64 b = 2;
}

message GCDResponse {
  uint64 result = 1;
}

service GCDService {
  rpc Compute (GCDRequest) returns (GCDResponse) {}
}

main.go

.
.
.
    s := grpc.NewServer()
    pb.RegisterGCDServiceServer(s, &server{})
    reflection.Register(s)
.
.
.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM