From 691fcdcc261f21a68f9c0c3299d389df9f4aa425 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Fri, 27 Mar 2020 17:24:31 -0400 Subject: [PATCH] Fix import --- protoc-gen-gogo/grpc/grpc.go | 2 +- protoc-gen-gogo/testdata/deprecated/deprecated.pb.go | 2 +- protoc-gen-gogo/testdata/grpc/grpc.pb.go | 2 +- protoc-gen-gogo/testdata/grpc/grpc_empty.pb.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protoc-gen-gogo/grpc/grpc.go b/protoc-gen-gogo/grpc/grpc.go index fdbe40ecb4..a565eb2862 100755 --- a/protoc-gen-gogo/grpc/grpc.go +++ b/protoc-gen-gogo/grpc/grpc.go @@ -183,7 +183,7 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi if deprecated { g.P(deprecationComment) } - g.P("func New", servName, "Client (cc ClientConn) ", servName, "Client {") + g.P("func New", servName, "Client (cc ", gogoGrpcPkg, ".ClientConn) ", servName, "Client {") g.P("return &", unexport(servName), "Client{cc}") g.P("}") g.P() diff --git a/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go b/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go index 7f7569c3f2..e3b934a8c3 100644 --- a/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go +++ b/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go @@ -214,7 +214,7 @@ type deprecatedServiceClient struct { } // Deprecated: Do not use. -func NewDeprecatedServiceClient(cc ClientConn) DeprecatedServiceClient { +func NewDeprecatedServiceClient(cc grpc1.ClientConn) DeprecatedServiceClient { return &deprecatedServiceClient{cc} } diff --git a/protoc-gen-gogo/testdata/grpc/grpc.pb.go b/protoc-gen-gogo/testdata/grpc/grpc.pb.go index 09d851ef4e..c96a164e32 100644 --- a/protoc-gen-gogo/testdata/grpc/grpc.pb.go +++ b/protoc-gen-gogo/testdata/grpc/grpc.pb.go @@ -199,7 +199,7 @@ type testClient struct { cc grpc1.ClientConn } -func NewTestClient(cc ClientConn) TestClient { +func NewTestClient(cc grpc1.ClientConn) TestClient { return &testClient{cc} } diff --git a/protoc-gen-gogo/testdata/grpc/grpc_empty.pb.go b/protoc-gen-gogo/testdata/grpc/grpc_empty.pb.go index c126c98ac1..8194c89caa 100644 --- a/protoc-gen-gogo/testdata/grpc/grpc_empty.pb.go +++ b/protoc-gen-gogo/testdata/grpc/grpc_empty.pb.go @@ -55,7 +55,7 @@ type emptyServiceClient struct { cc grpc1.ClientConn } -func NewEmptyServiceClient(cc ClientConn) EmptyServiceClient { +func NewEmptyServiceClient(cc grpc1.ClientConn) EmptyServiceClient { return &emptyServiceClient{cc} }