printFeature gets the feature for the given point.
(client pb.RouteGuideClient, point *pb.Point)
| 46 | |
| 47 | // printFeature gets the feature for the given point. |
| 48 | func printFeature(client pb.RouteGuideClient, point *pb.Point) { |
| 49 | log.Printf("Getting feature for point (%d, %d)", point.Latitude, point.Longitude) |
| 50 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| 51 | defer cancel() |
| 52 | feature, err := client.GetFeature(ctx, point) |
| 53 | if err != nil { |
| 54 | log.Fatalf("client.GetFeature failed: %v", err) |
| 55 | } |
| 56 | log.Println(feature) |
| 57 | } |
| 58 | |
| 59 | // printFeatures lists all the features within the given bounding Rectangle. |
| 60 | func printFeatures(client pb.RouteGuideClient, rect *pb.Rectangle) { |
no test coverage detected