-
-
Save vtolstov/f8a80ccde22f68a46c1a8432bf8aeae5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/helloworld/helloworld/helloworld.pb.go b/examples/helloworld/helloworld/helloworld.pb.go | |
index 2d5cbf5d7805..dd1694a818f7 100644 | |
--- a/examples/helloworld/helloworld/helloworld.pb.go | |
+++ b/examples/helloworld/helloworld/helloworld.pb.go | |
@@ -14,14 +14,13 @@ | |
// Code generated by protoc-gen-go. DO NOT EDIT. | |
// versions: | |
-// protoc-gen-go v1.25.0 | |
-// protoc v3.14.0 | |
+// protoc-gen-go v1.26.0 | |
+// protoc v3.19.4 | |
// source: examples/helloworld/helloworld/helloworld.proto | |
package helloworld | |
import ( | |
- proto "github.com/golang/protobuf/proto" | |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" | |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" | |
reflect "reflect" | |
@@ -35,10 +34,6 @@ const ( | |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) | |
) | |
-// This is a compile-time assertion that a sufficiently up-to-date version | |
-// of the legacy proto package is being used. | |
-const _ = proto.ProtoPackageIsVersion4 | |
- | |
// The request message containing the user's name. | |
type HelloRequest struct { | |
state protoimpl.MessageState | |
diff --git a/examples/helloworld/helloworld/helloworld_grpc.pb.go b/examples/helloworld/helloworld/helloworld_grpc.pb.go | |
index b1423484d51b..ce25ee75ce99 100644 | |
--- a/examples/helloworld/helloworld/helloworld_grpc.pb.go | |
+++ b/examples/helloworld/helloworld/helloworld_grpc.pb.go | |
@@ -1,7 +1,7 @@ | |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. | |
// versions: | |
// - protoc-gen-go-grpc v1.2.0 | |
-// - protoc v3.14.0 | |
+// - protoc v3.19.4 | |
// source: examples/helloworld/helloworld/helloworld.proto | |
package helloworld | |
@@ -10,6 +10,7 @@ import ( | |
context "context" | |
grpc "google.golang.org/grpc" | |
codes "google.golang.org/grpc/codes" | |
+ helloworld "google.golang.org/grpc/examples/helloworld/helloworld" | |
status "google.golang.org/grpc/status" | |
) | |
@@ -23,7 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 | |
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. | |
type GreeterClient interface { | |
// Sends a greeting | |
- SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) | |
+ SayHello(ctx context.Context, in *helloworld.HelloRequest, opts ...grpc.CallOption) (*helloworld.HelloReply, error) | |
} | |
type greeterClient struct { | |
@@ -34,8 +35,8 @@ func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { | |
return &greeterClient{cc} | |
} | |
-func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) { | |
- out := new(HelloReply) | |
+func (c *greeterClient) SayHello(ctx context.Context, in *helloworld.HelloRequest, opts ...grpc.CallOption) (*helloworld.HelloReply, error) { | |
+ out := new(helloworld.HelloReply) | |
err := c.cc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, opts...) | |
if err != nil { | |
return nil, err | |
@@ -48,7 +49,7 @@ func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ... | |
// for forward compatibility | |
type GreeterServer interface { | |
// Sends a greeting | |
- SayHello(context.Context, *HelloRequest) (*HelloReply, error) | |
+ SayHello(context.Context, *helloworld.HelloRequest) (*helloworld.HelloReply, error) | |
mustEmbedUnimplementedGreeterServer() | |
} | |
@@ -56,7 +57,7 @@ type GreeterServer interface { | |
type UnimplementedGreeterServer struct { | |
} | |
-func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) { | |
+func (UnimplementedGreeterServer) SayHello(context.Context, *helloworld.HelloRequest) (*helloworld.HelloReply, error) { | |
return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") | |
} | |
func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {} | |
@@ -73,7 +74,7 @@ func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { | |
} | |
func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |
- in := new(HelloRequest) | |
+ in := new(helloworld.HelloRequest) | |
if err := dec(in); err != nil { | |
return nil, err | |
} | |
@@ -85,7 +86,7 @@ func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(in | |
FullMethod: "/helloworld.Greeter/SayHello", | |
} | |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |
- return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest)) | |
+ return srv.(GreeterServer).SayHello(ctx, req.(*helloworld.HelloRequest)) | |
} | |
return interceptor(ctx, in, info, handler) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment