Skip to content

Commit

Permalink
merged 7c4add53b497798e7fd7b204f28e41ab409bdbb7 from golang/protobuf.…
Browse files Browse the repository at this point in the history
… protoc-gen-go: remove deprecated function in grpc (#426)
  • Loading branch information
jmarais authored and awalterschulze committed Jul 15, 2018
1 parent ebc0565 commit 2c42fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protoc-gen-gogo/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar strin
if !method.GetServerStreaming() && !method.GetClientStreaming() {
g.P("out := new(", outType, ")")
// TODO: Pass descExpr to Invoke.
g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`)
g.P(`err := c.cc.Invoke(ctx, "`, sname, `", in, out, opts...)`)
g.P("if err != nil { return nil, err }")
g.P("return out, nil")
g.P("}")
g.P()
return
}
streamType := unexport(servName) + methName + "Client"
g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`)
g.P("stream, err := c.cc.NewStream(ctx, ", descExpr, `, "`, sname, `", opts...)`)
g.P("if err != nil { return nil, err }")
g.P("x := &", streamType, "{stream}")
if !method.GetClientStreaming() {
Expand Down

0 comments on commit 2c42fe8

Please sign in to comment.