Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route_guide: use keyed fields for struct initializers #1829

Merged
merged 1 commit into from
Jan 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/route_guide/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down