// printFeatures lists all the features within the given bounding Rectangle. func doCount(client simple.SimpleClient, num int) { req := &simple.Number{Num: int32(num)} log.Printf("Count: %v", req) stream, err := client.Count(context.Background(), req) if err != nil { log.Printf("Failed to count: %v", err) return } for { reply, err := stream.Recv() if err == io.EOF { break } if err != nil { log.Printf("Count stream failed: %v", err) return } log.Printf("Count reply: %v", reply) } log.Printf("Counting complete") }