From 82e9f61ddde02833789fdca2123b576151db8654 Mon Sep 17 00:00:00 2001 From: dfawley Date: Wed, 24 Jan 2018 10:45:49 -0800 Subject: [PATCH] Use keyed fields for struct initializers (#1829) --- examples/route_guide/client/client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/route_guide/client/client.go b/examples/route_guide/client/client.go index 6fc7a079..e789fabb 100644 --- a/examples/route_guide/client/client.go +++ b/examples/route_guide/client/client.go @@ -101,12 +101,12 @@ func runRecordRoute(client pb.RouteGuideClient) { // runRouteChat receives a sequence of route notes, while sending notes for various locations. func runRouteChat(client pb.RouteGuideClient) { notes := []*pb.RouteNote{ - {&pb.Point{Latitude: 0, Longitude: 1}, "First message"}, - {&pb.Point{Latitude: 0, Longitude: 2}, "Second message"}, - {&pb.Point{Latitude: 0, Longitude: 3}, "Third message"}, - {&pb.Point{Latitude: 0, Longitude: 1}, "Fourth message"}, - {&pb.Point{Latitude: 0, Longitude: 2}, "Fifth message"}, - {&pb.Point{Latitude: 0, Longitude: 3}, "Sixth message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 1}, Message: "First message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 2}, Message: "Second message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 3}, Message: "Third message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 1}, Message: "Fourth message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 2}, Message: "Fifth message"}, + {Location: &pb.Point{Latitude: 0, Longitude: 3}, Message: "Sixth message"}, } stream, err := client.RouteChat(context.Background()) if err != nil {