From bf42086a4b79aa48f8389f1e817d00600a283726 Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Thu, 29 Oct 2015 14:26:16 -0700 Subject: [PATCH] regenerated the code for route_guide.proto --- .../route_guide/routeguide/route_guide.pb.go | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/examples/route_guide/routeguide/route_guide.pb.go b/examples/route_guide/routeguide/route_guide.pb.go index 9ac9029a..7b209472 100644 --- a/examples/route_guide/routeguide/route_guide.pb.go +++ b/examples/route_guide/routeguide/route_guide.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-go. -// source: route_guide.proto +// source: google.golang.org/grpc/examples/route_guide/routeguide/route_guide.proto // DO NOT EDIT! /* -Package proto is a generated protocol buffer package. +Package routeguide is a generated protocol buffer package. It is generated from these files: - route_guide.proto + google.golang.org/grpc/examples/route_guide/routeguide/route_guide.proto It has these top-level messages: Point @@ -17,7 +17,9 @@ It has these top-level messages: */ package routeguide -import proto1 "github.com/golang/protobuf/proto" +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" import ( context "golang.org/x/net/context" @@ -25,11 +27,9 @@ import ( ) // Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.Marshal +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // Points are represented as latitude-longitude pairs in the E7 representation // (degrees multiplied by 10**7 and rounded to the nearest integer). @@ -41,7 +41,7 @@ type Point struct { } func (m *Point) Reset() { *m = Point{} } -func (m *Point) String() string { return proto1.CompactTextString(m) } +func (m *Point) String() string { return proto.CompactTextString(m) } func (*Point) ProtoMessage() {} // A latitude-longitude rectangle, represented as two diagonally opposite @@ -54,7 +54,7 @@ type Rectangle struct { } func (m *Rectangle) Reset() { *m = Rectangle{} } -func (m *Rectangle) String() string { return proto1.CompactTextString(m) } +func (m *Rectangle) String() string { return proto.CompactTextString(m) } func (*Rectangle) ProtoMessage() {} func (m *Rectangle) GetLo() *Point { @@ -82,7 +82,7 @@ type Feature struct { } func (m *Feature) Reset() { *m = Feature{} } -func (m *Feature) String() string { return proto1.CompactTextString(m) } +func (m *Feature) String() string { return proto.CompactTextString(m) } func (*Feature) ProtoMessage() {} func (m *Feature) GetLocation() *Point { @@ -101,7 +101,7 @@ type RouteNote struct { } func (m *RouteNote) Reset() { *m = RouteNote{} } -func (m *RouteNote) String() string { return proto1.CompactTextString(m) } +func (m *RouteNote) String() string { return proto.CompactTextString(m) } func (*RouteNote) ProtoMessage() {} func (m *RouteNote) GetLocation() *Point { @@ -128,11 +128,12 @@ type RouteSummary struct { } func (m *RouteSummary) Reset() { *m = RouteSummary{} } -func (m *RouteSummary) String() string { return proto1.CompactTextString(m) } +func (m *RouteSummary) String() string { return proto.CompactTextString(m) } func (*RouteSummary) ProtoMessage() {} -func init() { -} +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn // Client API for RouteGuide service @@ -173,7 +174,7 @@ func NewRouteGuideClient(cc *grpc.ClientConn) RouteGuideClient { func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error) { out := new(Feature) - err := grpc.Invoke(ctx, "/proto.RouteGuide/GetFeature", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/routeguide.RouteGuide/GetFeature", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -181,7 +182,7 @@ func (c *routeGuideClient) GetFeature(ctx context.Context, in *Point, opts ...gr } func (c *routeGuideClient) ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (RouteGuide_ListFeaturesClient, error) { - stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[0], c.cc, "/proto.RouteGuide/ListFeatures", opts...) + stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[0], c.cc, "/routeguide.RouteGuide/ListFeatures", opts...) if err != nil { return nil, err } @@ -213,7 +214,7 @@ func (x *routeGuideListFeaturesClient) Recv() (*Feature, error) { } func (c *routeGuideClient) RecordRoute(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RecordRouteClient, error) { - stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[1], c.cc, "/proto.RouteGuide/RecordRoute", opts...) + stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[1], c.cc, "/routeguide.RouteGuide/RecordRoute", opts...) if err != nil { return nil, err } @@ -247,7 +248,7 @@ func (x *routeGuideRecordRouteClient) CloseAndRecv() (*RouteSummary, error) { } func (c *routeGuideClient) RouteChat(ctx context.Context, opts ...grpc.CallOption) (RouteGuide_RouteChatClient, error) { - stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[2], c.cc, "/proto.RouteGuide/RouteChat", opts...) + stream, err := grpc.NewClientStream(ctx, &_RouteGuide_serviceDesc.Streams[2], c.cc, "/routeguide.RouteGuide/RouteChat", opts...) if err != nil { return nil, err } @@ -396,7 +397,7 @@ func (x *routeGuideRouteChatServer) Recv() (*RouteNote, error) { } var _RouteGuide_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.RouteGuide", + ServiceName: "routeguide.RouteGuide", HandlerType: (*RouteGuideServer)(nil), Methods: []grpc.MethodDesc{ {