diff --git a/internal/gengapic/example.go b/internal/gengapic/example.go index 213bb6184..2061dd05a 100644 --- a/internal/gengapic/example.go +++ b/internal/gengapic/example.go @@ -333,7 +333,7 @@ func (g *generator) examplePagingAllCall(m *descriptorpb.MethodDescriptorProto) p("for resp, err := range c.%s(ctx, req).All() {", m.GetName()) p(" if err != nil {") - p(" // TODO: Handle error.") + p(" // TODO: Handle error and break/return/continue. Iteration will stop after any error.") p(" }") p(" // TODO: Use resp.") p(" _ = resp") diff --git a/internal/gengapic/testdata/custom_op_example_all.want b/internal/gengapic/testdata/custom_op_example_all.want index 9b181e70a..f4ea638ee 100644 --- a/internal/gengapic/testdata/custom_op_example_all.want +++ b/internal/gengapic/testdata/custom_op_example_all.want @@ -17,7 +17,7 @@ func ExampleFooClient_GetManyThings_all() { } for resp, err := range c.GetManyThings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/internal/gengapic/testdata/empty_example_all.want b/internal/gengapic/testdata/empty_example_all.want index 7a234b448..b2bc4e05f 100644 --- a/internal/gengapic/testdata/empty_example_all.want +++ b/internal/gengapic/testdata/empty_example_all.want @@ -17,7 +17,7 @@ func ExampleClient_GetManyThings_all() { } for resp, err := range c.GetManyThings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -43,7 +43,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -69,7 +69,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/internal/gengapic/testdata/empty_example_grpc_all.want b/internal/gengapic/testdata/empty_example_grpc_all.want index 7a234b448..b2bc4e05f 100644 --- a/internal/gengapic/testdata/empty_example_grpc_all.want +++ b/internal/gengapic/testdata/empty_example_grpc_all.want @@ -17,7 +17,7 @@ func ExampleClient_GetManyThings_all() { } for resp, err := range c.GetManyThings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -43,7 +43,7 @@ func ExampleClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -69,7 +69,7 @@ func ExampleClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/internal/gengapic/testdata/foo_example_all.want b/internal/gengapic/testdata/foo_example_all.want index 3da4d43bf..d9a501d91 100644 --- a/internal/gengapic/testdata/foo_example_all.want +++ b/internal/gengapic/testdata/foo_example_all.want @@ -17,7 +17,7 @@ func ExampleFooClient_GetManyThings_all() { } for resp, err := range c.GetManyThings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -43,7 +43,7 @@ func ExampleFooClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -69,7 +69,7 @@ func ExampleFooClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp diff --git a/internal/gengapic/testdata/foo_example_rest_all.want b/internal/gengapic/testdata/foo_example_rest_all.want index 146e6497e..1e5e7d951 100644 --- a/internal/gengapic/testdata/foo_example_rest_all.want +++ b/internal/gengapic/testdata/foo_example_rest_all.want @@ -17,7 +17,7 @@ func ExampleFooClient_GetManyThings_all() { } for resp, err := range c.GetManyThings(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -43,7 +43,7 @@ func ExampleFooClient_ListLocations_all() { } for resp, err := range c.ListLocations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp @@ -69,7 +69,7 @@ func ExampleFooClient_ListOperations_all() { } for resp, err := range c.ListOperations(ctx, req).All() { if err != nil { - // TODO: Handle error. + // TODO: Handle error and break/return/continue. Iteration will stop after any error. } // TODO: Use resp. _ = resp