diff --git a/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go b/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go index 84e6a25056b9..c4ace87b266f 100644 --- a/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go +++ b/balancer/grpclb/grpc_lb_v1/load_balancer_grpc.pb.go @@ -86,7 +86,7 @@ type LoadBalancerServer interface { type UnimplementedLoadBalancerServer struct{} func (UnimplementedLoadBalancerServer) BalanceLoad(grpc.BidiStreamingServer[LoadBalanceRequest, LoadBalanceResponse]) error { - return status.Errorf(codes.Unimplemented, "method BalanceLoad not implemented") + return status.Error(codes.Unimplemented, "method BalanceLoad not implemented") } func (UnimplementedLoadBalancerServer) testEmbeddedByValue() {} diff --git a/channelz/grpc_channelz_v1/channelz_grpc.pb.go b/channelz/grpc_channelz_v1/channelz_grpc.pb.go index 4587b484f611..5d244fd6cb17 100644 --- a/channelz/grpc_channelz_v1/channelz_grpc.pb.go +++ b/channelz/grpc_channelz_v1/channelz_grpc.pb.go @@ -183,25 +183,25 @@ type ChannelzServer interface { type UnimplementedChannelzServer struct{} func (UnimplementedChannelzServer) GetTopChannels(context.Context, *GetTopChannelsRequest) (*GetTopChannelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopChannels not implemented") + return nil, status.Error(codes.Unimplemented, "method GetTopChannels not implemented") } func (UnimplementedChannelzServer) GetServers(context.Context, *GetServersRequest) (*GetServersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServers not implemented") + return nil, status.Error(codes.Unimplemented, "method GetServers not implemented") } func (UnimplementedChannelzServer) GetServer(context.Context, *GetServerRequest) (*GetServerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServer not implemented") + return nil, status.Error(codes.Unimplemented, "method GetServer not implemented") } func (UnimplementedChannelzServer) GetServerSockets(context.Context, *GetServerSocketsRequest) (*GetServerSocketsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServerSockets not implemented") + return nil, status.Error(codes.Unimplemented, "method GetServerSockets not implemented") } func (UnimplementedChannelzServer) GetChannel(context.Context, *GetChannelRequest) (*GetChannelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetChannel not implemented") + return nil, status.Error(codes.Unimplemented, "method GetChannel not implemented") } func (UnimplementedChannelzServer) GetSubchannel(context.Context, *GetSubchannelRequest) (*GetSubchannelResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSubchannel not implemented") + return nil, status.Error(codes.Unimplemented, "method GetSubchannel not implemented") } func (UnimplementedChannelzServer) GetSocket(context.Context, *GetSocketRequest) (*GetSocketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSocket not implemented") + return nil, status.Error(codes.Unimplemented, "method GetSocket not implemented") } func (UnimplementedChannelzServer) testEmbeddedByValue() {} diff --git a/cmd/protoc-gen-go-grpc/grpc.go b/cmd/protoc-gen-go-grpc/grpc.go index f562cdb6e701..cff016d66a97 100644 --- a/cmd/protoc-gen-go-grpc/grpc.go +++ b/cmd/protoc-gen-go-grpc/grpc.go @@ -97,7 +97,7 @@ func (serviceGenerateHelper) generateUnimplementedServerType(_ *protogen.Plugin, nilArg = "nil," } g.P("func (Unimplemented", serverType, ") ", serverSignature(g, method), "{") - g.P("return ", nilArg, statusPackage.Ident("Errorf"), "(", codesPackage.Ident("Unimplemented"), `, "method `, method.GoName, ` not implemented")`) + g.P("return ", nilArg, statusPackage.Ident("Error"), "(", codesPackage.Ident("Unimplemented"), `, "method `, method.GoName, ` not implemented")`) g.P("}") } if *requireUnimplemented { diff --git a/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go b/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go index 34443b1d2dcf..21cb01be66f0 100644 --- a/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go +++ b/credentials/alts/internal/proto/grpc_gcp/handshaker_grpc.pb.go @@ -95,7 +95,7 @@ type HandshakerServiceServer interface { type UnimplementedHandshakerServiceServer struct{} func (UnimplementedHandshakerServiceServer) DoHandshake(grpc.BidiStreamingServer[HandshakerReq, HandshakerResp]) error { - return status.Errorf(codes.Unimplemented, "method DoHandshake not implemented") + return status.Error(codes.Unimplemented, "method DoHandshake not implemented") } func (UnimplementedHandshakerServiceServer) mustEmbedUnimplementedHandshakerServiceServer() {} func (UnimplementedHandshakerServiceServer) testEmbeddedByValue() {} diff --git a/examples/features/proto/echo/echo_grpc.pb.go b/examples/features/proto/echo/echo_grpc.pb.go index d8324f62dec2..bd0c1993d814 100644 --- a/examples/features/proto/echo/echo_grpc.pb.go +++ b/examples/features/proto/echo/echo_grpc.pb.go @@ -146,16 +146,16 @@ type EchoServer interface { type UnimplementedEchoServer struct{} func (UnimplementedEchoServer) UnaryEcho(context.Context, *EchoRequest) (*EchoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnaryEcho not implemented") + return nil, status.Error(codes.Unimplemented, "method UnaryEcho not implemented") } func (UnimplementedEchoServer) ServerStreamingEcho(*EchoRequest, grpc.ServerStreamingServer[EchoResponse]) error { - return status.Errorf(codes.Unimplemented, "method ServerStreamingEcho not implemented") + return status.Error(codes.Unimplemented, "method ServerStreamingEcho not implemented") } func (UnimplementedEchoServer) ClientStreamingEcho(grpc.ClientStreamingServer[EchoRequest, EchoResponse]) error { - return status.Errorf(codes.Unimplemented, "method ClientStreamingEcho not implemented") + return status.Error(codes.Unimplemented, "method ClientStreamingEcho not implemented") } func (UnimplementedEchoServer) BidirectionalStreamingEcho(grpc.BidiStreamingServer[EchoRequest, EchoResponse]) error { - return status.Errorf(codes.Unimplemented, "method BidirectionalStreamingEcho not implemented") + return status.Error(codes.Unimplemented, "method BidirectionalStreamingEcho not implemented") } func (UnimplementedEchoServer) mustEmbedUnimplementedEchoServer() {} func (UnimplementedEchoServer) testEmbeddedByValue() {} diff --git a/examples/helloworld/helloworld/helloworld_grpc.pb.go b/examples/helloworld/helloworld/helloworld_grpc.pb.go index 1e31c83a88f8..fbd854ea4f86 100644 --- a/examples/helloworld/helloworld/helloworld_grpc.pb.go +++ b/examples/helloworld/helloworld/helloworld_grpc.pb.go @@ -83,7 +83,7 @@ type GreeterServer interface { type UnimplementedGreeterServer struct{} func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") + return nil, status.Error(codes.Unimplemented, "method SayHello not implemented") } func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {} func (UnimplementedGreeterServer) testEmbeddedByValue() {} diff --git a/examples/route_guide/routeguide/route_guide_grpc.pb.go b/examples/route_guide/routeguide/route_guide_grpc.pb.go index 3777d1b7c1e7..db5fe607eea8 100644 --- a/examples/route_guide/routeguide/route_guide_grpc.pb.go +++ b/examples/route_guide/routeguide/route_guide_grpc.pb.go @@ -175,16 +175,16 @@ type RouteGuideServer interface { type UnimplementedRouteGuideServer struct{} func (UnimplementedRouteGuideServer) GetFeature(context.Context, *Point) (*Feature, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented") + return nil, status.Error(codes.Unimplemented, "method GetFeature not implemented") } func (UnimplementedRouteGuideServer) ListFeatures(*Rectangle, grpc.ServerStreamingServer[Feature]) error { - return status.Errorf(codes.Unimplemented, "method ListFeatures not implemented") + return status.Error(codes.Unimplemented, "method ListFeatures not implemented") } func (UnimplementedRouteGuideServer) RecordRoute(grpc.ClientStreamingServer[Point, RouteSummary]) error { - return status.Errorf(codes.Unimplemented, "method RecordRoute not implemented") + return status.Error(codes.Unimplemented, "method RecordRoute not implemented") } func (UnimplementedRouteGuideServer) RouteChat(grpc.BidiStreamingServer[RouteNote, RouteNote]) error { - return status.Errorf(codes.Unimplemented, "method RouteChat not implemented") + return status.Error(codes.Unimplemented, "method RouteChat not implemented") } func (UnimplementedRouteGuideServer) mustEmbedUnimplementedRouteGuideServer() {} func (UnimplementedRouteGuideServer) testEmbeddedByValue() {} diff --git a/health/grpc_health_v1/health_grpc.pb.go b/health/grpc_health_v1/health_grpc.pb.go index 93136610ec62..f2c01f296ace 100644 --- a/health/grpc_health_v1/health_grpc.pb.go +++ b/health/grpc_health_v1/health_grpc.pb.go @@ -188,13 +188,13 @@ type HealthServer interface { type UnimplementedHealthServer struct{} func (UnimplementedHealthServer) Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") + return nil, status.Error(codes.Unimplemented, "method Check not implemented") } func (UnimplementedHealthServer) List(context.Context, *HealthListRequest) (*HealthListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") + return nil, status.Error(codes.Unimplemented, "method List not implemented") } func (UnimplementedHealthServer) Watch(*HealthCheckRequest, grpc.ServerStreamingServer[HealthCheckResponse]) error { - return status.Errorf(codes.Unimplemented, "method Watch not implemented") + return status.Error(codes.Unimplemented, "method Watch not implemented") } func (UnimplementedHealthServer) testEmbeddedByValue() {} diff --git a/internal/proto/grpc_lookup_v1/rls_grpc.pb.go b/internal/proto/grpc_lookup_v1/rls_grpc.pb.go index 23dcb2100c3d..16611074cac0 100644 --- a/internal/proto/grpc_lookup_v1/rls_grpc.pb.go +++ b/internal/proto/grpc_lookup_v1/rls_grpc.pb.go @@ -79,7 +79,7 @@ type RouteLookupServiceServer interface { type UnimplementedRouteLookupServiceServer struct{} func (UnimplementedRouteLookupServiceServer) RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RouteLookup not implemented") + return nil, status.Error(codes.Unimplemented, "method RouteLookup not implemented") } func (UnimplementedRouteLookupServiceServer) mustEmbedUnimplementedRouteLookupServiceServer() {} func (UnimplementedRouteLookupServiceServer) testEmbeddedByValue() {} diff --git a/interop/grpc_testing/benchmark_service_grpc.pb.go b/interop/grpc_testing/benchmark_service_grpc.pb.go index cd5d64d7e61f..f6424a57e4a3 100644 --- a/interop/grpc_testing/benchmark_service_grpc.pb.go +++ b/interop/grpc_testing/benchmark_service_grpc.pb.go @@ -172,19 +172,19 @@ type BenchmarkServiceServer interface { type UnimplementedBenchmarkServiceServer struct{} func (UnimplementedBenchmarkServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") + return nil, status.Error(codes.Unimplemented, "method UnaryCall not implemented") } func (UnimplementedBenchmarkServiceServer) StreamingCall(grpc.BidiStreamingServer[SimpleRequest, SimpleResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingCall not implemented") + return status.Error(codes.Unimplemented, "method StreamingCall not implemented") } func (UnimplementedBenchmarkServiceServer) StreamingFromClient(grpc.ClientStreamingServer[SimpleRequest, SimpleResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingFromClient not implemented") + return status.Error(codes.Unimplemented, "method StreamingFromClient not implemented") } func (UnimplementedBenchmarkServiceServer) StreamingFromServer(*SimpleRequest, grpc.ServerStreamingServer[SimpleResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingFromServer not implemented") + return status.Error(codes.Unimplemented, "method StreamingFromServer not implemented") } func (UnimplementedBenchmarkServiceServer) StreamingBothWays(grpc.BidiStreamingServer[SimpleRequest, SimpleResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingBothWays not implemented") + return status.Error(codes.Unimplemented, "method StreamingBothWays not implemented") } func (UnimplementedBenchmarkServiceServer) mustEmbedUnimplementedBenchmarkServiceServer() {} func (UnimplementedBenchmarkServiceServer) testEmbeddedByValue() {} diff --git a/interop/grpc_testing/report_qps_scenario_service_grpc.pb.go b/interop/grpc_testing/report_qps_scenario_service_grpc.pb.go index 9198e4a6e194..864762a3b998 100644 --- a/interop/grpc_testing/report_qps_scenario_service_grpc.pb.go +++ b/interop/grpc_testing/report_qps_scenario_service_grpc.pb.go @@ -82,7 +82,7 @@ type ReportQpsScenarioServiceServer interface { type UnimplementedReportQpsScenarioServiceServer struct{} func (UnimplementedReportQpsScenarioServiceServer) ReportScenario(context.Context, *ScenarioResult) (*Void, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportScenario not implemented") + return nil, status.Error(codes.Unimplemented, "method ReportScenario not implemented") } func (UnimplementedReportQpsScenarioServiceServer) mustEmbedUnimplementedReportQpsScenarioServiceServer() { } diff --git a/interop/grpc_testing/test_grpc.pb.go b/interop/grpc_testing/test_grpc.pb.go index 2e35398ed33e..32d683433d2c 100644 --- a/interop/grpc_testing/test_grpc.pb.go +++ b/interop/grpc_testing/test_grpc.pb.go @@ -231,28 +231,28 @@ type TestServiceServer interface { type UnimplementedTestServiceServer struct{} func (UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented") + return nil, status.Error(codes.Unimplemented, "method EmptyCall not implemented") } func (UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") + return nil, status.Error(codes.Unimplemented, "method UnaryCall not implemented") } func (UnimplementedTestServiceServer) CacheableUnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CacheableUnaryCall not implemented") + return nil, status.Error(codes.Unimplemented, "method CacheableUnaryCall not implemented") } func (UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, grpc.ServerStreamingServer[StreamingOutputCallResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented") + return status.Error(codes.Unimplemented, "method StreamingOutputCall not implemented") } func (UnimplementedTestServiceServer) StreamingInputCall(grpc.ClientStreamingServer[StreamingInputCallRequest, StreamingInputCallResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented") + return status.Error(codes.Unimplemented, "method StreamingInputCall not implemented") } func (UnimplementedTestServiceServer) FullDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error { - return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented") + return status.Error(codes.Unimplemented, "method FullDuplexCall not implemented") } func (UnimplementedTestServiceServer) HalfDuplexCall(grpc.BidiStreamingServer[StreamingOutputCallRequest, StreamingOutputCallResponse]) error { - return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented") + return status.Error(codes.Unimplemented, "method HalfDuplexCall not implemented") } func (UnimplementedTestServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented") + return nil, status.Error(codes.Unimplemented, "method UnimplementedCall not implemented") } func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} func (UnimplementedTestServiceServer) testEmbeddedByValue() {} @@ -483,7 +483,7 @@ type UnimplementedServiceServer interface { type UnimplementedUnimplementedServiceServer struct{} func (UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented") + return nil, status.Error(codes.Unimplemented, "method UnimplementedCall not implemented") } func (UnimplementedUnimplementedServiceServer) mustEmbedUnimplementedUnimplementedServiceServer() {} func (UnimplementedUnimplementedServiceServer) testEmbeddedByValue() {} @@ -602,10 +602,10 @@ type ReconnectServiceServer interface { type UnimplementedReconnectServiceServer struct{} func (UnimplementedReconnectServiceServer) Start(context.Context, *ReconnectParams) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Start not implemented") + return nil, status.Error(codes.Unimplemented, "method Start not implemented") } func (UnimplementedReconnectServiceServer) Stop(context.Context, *Empty) (*ReconnectInfo, error) { - return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") + return nil, status.Error(codes.Unimplemented, "method Stop not implemented") } func (UnimplementedReconnectServiceServer) mustEmbedUnimplementedReconnectServiceServer() {} func (UnimplementedReconnectServiceServer) testEmbeddedByValue() {} @@ -750,10 +750,10 @@ type LoadBalancerStatsServiceServer interface { type UnimplementedLoadBalancerStatsServiceServer struct{} func (UnimplementedLoadBalancerStatsServiceServer) GetClientStats(context.Context, *LoadBalancerStatsRequest) (*LoadBalancerStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetClientStats not implemented") + return nil, status.Error(codes.Unimplemented, "method GetClientStats not implemented") } func (UnimplementedLoadBalancerStatsServiceServer) GetClientAccumulatedStats(context.Context, *LoadBalancerAccumulatedStatsRequest) (*LoadBalancerAccumulatedStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetClientAccumulatedStats not implemented") + return nil, status.Error(codes.Unimplemented, "method GetClientAccumulatedStats not implemented") } func (UnimplementedLoadBalancerStatsServiceServer) mustEmbedUnimplementedLoadBalancerStatsServiceServer() { } @@ -916,13 +916,13 @@ type HookServiceServer interface { type UnimplementedHookServiceServer struct{} func (UnimplementedHookServiceServer) Hook(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Hook not implemented") + return nil, status.Error(codes.Unimplemented, "method Hook not implemented") } func (UnimplementedHookServiceServer) SetReturnStatus(context.Context, *SetReturnStatusRequest) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetReturnStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method SetReturnStatus not implemented") } func (UnimplementedHookServiceServer) ClearReturnStatus(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClearReturnStatus not implemented") + return nil, status.Error(codes.Unimplemented, "method ClearReturnStatus not implemented") } func (UnimplementedHookServiceServer) mustEmbedUnimplementedHookServiceServer() {} func (UnimplementedHookServiceServer) testEmbeddedByValue() {} @@ -1098,13 +1098,13 @@ type XdsUpdateHealthServiceServer interface { type UnimplementedXdsUpdateHealthServiceServer struct{} func (UnimplementedXdsUpdateHealthServiceServer) SetServing(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetServing not implemented") + return nil, status.Error(codes.Unimplemented, "method SetServing not implemented") } func (UnimplementedXdsUpdateHealthServiceServer) SetNotServing(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNotServing not implemented") + return nil, status.Error(codes.Unimplemented, "method SetNotServing not implemented") } func (UnimplementedXdsUpdateHealthServiceServer) SendHookRequest(context.Context, *HookRequest) (*HookResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendHookRequest not implemented") + return nil, status.Error(codes.Unimplemented, "method SendHookRequest not implemented") } func (UnimplementedXdsUpdateHealthServiceServer) mustEmbedUnimplementedXdsUpdateHealthServiceServer() { } @@ -1257,7 +1257,7 @@ type XdsUpdateClientConfigureServiceServer interface { type UnimplementedXdsUpdateClientConfigureServiceServer struct{} func (UnimplementedXdsUpdateClientConfigureServiceServer) Configure(context.Context, *ClientConfigureRequest) (*ClientConfigureResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented") + return nil, status.Error(codes.Unimplemented, "method Configure not implemented") } func (UnimplementedXdsUpdateClientConfigureServiceServer) mustEmbedUnimplementedXdsUpdateClientConfigureServiceServer() { } diff --git a/interop/grpc_testing/worker_service_grpc.pb.go b/interop/grpc_testing/worker_service_grpc.pb.go index 40cb6949ffe2..dca4069d5b89 100644 --- a/interop/grpc_testing/worker_service_grpc.pb.go +++ b/interop/grpc_testing/worker_service_grpc.pb.go @@ -153,16 +153,16 @@ type WorkerServiceServer interface { type UnimplementedWorkerServiceServer struct{} func (UnimplementedWorkerServiceServer) RunServer(grpc.BidiStreamingServer[ServerArgs, ServerStatus]) error { - return status.Errorf(codes.Unimplemented, "method RunServer not implemented") + return status.Error(codes.Unimplemented, "method RunServer not implemented") } func (UnimplementedWorkerServiceServer) RunClient(grpc.BidiStreamingServer[ClientArgs, ClientStatus]) error { - return status.Errorf(codes.Unimplemented, "method RunClient not implemented") + return status.Error(codes.Unimplemented, "method RunClient not implemented") } func (UnimplementedWorkerServiceServer) CoreCount(context.Context, *CoreRequest) (*CoreResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CoreCount not implemented") + return nil, status.Error(codes.Unimplemented, "method CoreCount not implemented") } func (UnimplementedWorkerServiceServer) QuitWorker(context.Context, *Void) (*Void, error) { - return nil, status.Errorf(codes.Unimplemented, "method QuitWorker not implemented") + return nil, status.Error(codes.Unimplemented, "method QuitWorker not implemented") } func (UnimplementedWorkerServiceServer) mustEmbedUnimplementedWorkerServiceServer() {} func (UnimplementedWorkerServiceServer) testEmbeddedByValue() {} diff --git a/interop/stress/grpc_testing/metrics_grpc.pb.go b/interop/stress/grpc_testing/metrics_grpc.pb.go index 2ce1771fd57b..ec911670daf8 100644 --- a/interop/stress/grpc_testing/metrics_grpc.pb.go +++ b/interop/stress/grpc_testing/metrics_grpc.pb.go @@ -112,10 +112,10 @@ type MetricsServiceServer interface { type UnimplementedMetricsServiceServer struct{} func (UnimplementedMetricsServiceServer) GetAllGauges(*EmptyMessage, grpc.ServerStreamingServer[GaugeResponse]) error { - return status.Errorf(codes.Unimplemented, "method GetAllGauges not implemented") + return status.Error(codes.Unimplemented, "method GetAllGauges not implemented") } func (UnimplementedMetricsServiceServer) GetGauge(context.Context, *GaugeRequest) (*GaugeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGauge not implemented") + return nil, status.Error(codes.Unimplemented, "method GetGauge not implemented") } func (UnimplementedMetricsServiceServer) mustEmbedUnimplementedMetricsServiceServer() {} func (UnimplementedMetricsServiceServer) testEmbeddedByValue() {} diff --git a/profiling/proto/service_grpc.pb.go b/profiling/proto/service_grpc.pb.go index 4ff100173914..fd3696d2df76 100644 --- a/profiling/proto/service_grpc.pb.go +++ b/profiling/proto/service_grpc.pb.go @@ -101,10 +101,10 @@ type ProfilingServer interface { type UnimplementedProfilingServer struct{} func (UnimplementedProfilingServer) Enable(context.Context, *EnableRequest) (*EnableResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Enable not implemented") + return nil, status.Error(codes.Unimplemented, "method Enable not implemented") } func (UnimplementedProfilingServer) GetStreamStats(context.Context, *GetStreamStatsRequest) (*GetStreamStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStreamStats not implemented") + return nil, status.Error(codes.Unimplemented, "method GetStreamStats not implemented") } func (UnimplementedProfilingServer) testEmbeddedByValue() {} diff --git a/reflection/grpc_reflection_v1/reflection_grpc.pb.go b/reflection/grpc_reflection_v1/reflection_grpc.pb.go index 031082807674..f4a361c644e7 100644 --- a/reflection/grpc_reflection_v1/reflection_grpc.pb.go +++ b/reflection/grpc_reflection_v1/reflection_grpc.pb.go @@ -90,7 +90,7 @@ type ServerReflectionServer interface { type UnimplementedServerReflectionServer struct{} func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error { - return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented") + return status.Error(codes.Unimplemented, "method ServerReflectionInfo not implemented") } func (UnimplementedServerReflectionServer) testEmbeddedByValue() {} diff --git a/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go b/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go index 80755d74d745..0a43b521c987 100644 --- a/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go +++ b/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go @@ -87,7 +87,7 @@ type ServerReflectionServer interface { type UnimplementedServerReflectionServer struct{} func (UnimplementedServerReflectionServer) ServerReflectionInfo(grpc.BidiStreamingServer[ServerReflectionRequest, ServerReflectionResponse]) error { - return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented") + return status.Error(codes.Unimplemented, "method ServerReflectionInfo not implemented") } func (UnimplementedServerReflectionServer) testEmbeddedByValue() {} diff --git a/reflection/grpc_testing/test_grpc.pb.go b/reflection/grpc_testing/test_grpc.pb.go index 3a7e8e6234a1..44846e414840 100644 --- a/reflection/grpc_testing/test_grpc.pb.go +++ b/reflection/grpc_testing/test_grpc.pb.go @@ -93,10 +93,10 @@ type SearchServiceServer interface { type UnimplementedSearchServiceServer struct{} func (UnimplementedSearchServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") + return nil, status.Error(codes.Unimplemented, "method Search not implemented") } func (UnimplementedSearchServiceServer) StreamingSearch(grpc.BidiStreamingServer[SearchRequest, SearchResponse]) error { - return status.Errorf(codes.Unimplemented, "method StreamingSearch not implemented") + return status.Error(codes.Unimplemented, "method StreamingSearch not implemented") } func (UnimplementedSearchServiceServer) mustEmbedUnimplementedSearchServiceServer() {} func (UnimplementedSearchServiceServer) testEmbeddedByValue() {}