From 0c1f6d65b5a189c2250d10e71a5506f06f9fa0a0 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Tue, 14 Jun 2016 15:31:40 -0700 Subject: [PATCH] protoc-gen-go/grpc: pass file descriptor for service as Metadata Bump support package version number from 2 to 3. --- protoc-gen-go/grpc/grpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protoc-gen-go/grpc/grpc.go b/protoc-gen-go/grpc/grpc.go index 291cbdb464..a29a8d2c20 100644 --- a/protoc-gen-go/grpc/grpc.go +++ b/protoc-gen-go/grpc/grpc.go @@ -48,7 +48,7 @@ import ( // It is incremented whenever an incompatibility between the generated code and // the grpc package is introduced; the generated code references // a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). -const generatedCodeVersion = 2 +const generatedCodeVersion = 3 // Paths for packages used by code generated in this file, // relative to the import_prefix of the generator.Generator. @@ -254,6 +254,7 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi g.P("},") } g.P("},") + g.P("Metadata: ", file.VarName(), ",") g.P("}") g.P() }