diff --git a/examples/addsvc/client/grpc/client.go b/examples/addsvc/client/grpc/client.go index 5ede6197e..2abcdae27 100644 --- a/examples/addsvc/client/grpc/client.go +++ b/examples/addsvc/client/grpc/client.go @@ -34,7 +34,7 @@ func New(conn *grpc.ClientConn, tracer stdopentracing.Tracer, logger log.Logger) { sumEndpoint = grpctransport.NewClient( conn, - "Add", + "pb.Add", "Sum", addsvc.EncodeGRPCSumRequest, addsvc.DecodeGRPCSumResponse, @@ -53,7 +53,7 @@ func New(conn *grpc.ClientConn, tracer stdopentracing.Tracer, logger log.Logger) { concatEndpoint = grpctransport.NewClient( conn, - "Add", + "pb.Add", "Concat", addsvc.EncodeGRPCConcatRequest, addsvc.DecodeGRPCConcatResponse, diff --git a/transport/grpc/client.go b/transport/grpc/client.go index c0faa2b36..535b70f24 100644 --- a/transport/grpc/client.go +++ b/transport/grpc/client.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "reflect" - "strings" "google.golang.org/grpc" "google.golang.org/grpc/metadata" @@ -37,9 +36,6 @@ func NewClient( grpcReply interface{}, options ...ClientOption, ) *Client { - if strings.IndexByte(serviceName, '.') == -1 { - serviceName = "pb." + serviceName - } c := &Client{ client: cc, method: fmt.Sprintf("/%s/%s", serviceName, method),