From cd69b5d0af6bd46ca17b94acaa09256a863ac277 Mon Sep 17 00:00:00 2001 From: Arvind Bright Date: Thu, 1 Feb 2024 13:49:00 -0800 Subject: [PATCH] .*: fix minor linter issues (#6958) --- interop/client/client.go | 4 ++-- interop/test_utils.go | 4 ++-- vet.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interop/client/client.go b/interop/client/client.go index c9245797ce39..379fd017c27e 100644 --- a/interop/client/client.go +++ b/interop/client/client.go @@ -349,10 +349,10 @@ func main() { interop.DoCustomMetadata(ctx, tc) logger.Infoln("CustomMetadata done") case "unimplemented_method": - interop.DoUnimplementedMethod(conn, ctx) + interop.DoUnimplementedMethod(ctx, conn) logger.Infoln("UnimplementedMethod done") case "unimplemented_service": - interop.DoUnimplementedService(testgrpc.NewUnimplementedServiceClient(conn), ctx) + interop.DoUnimplementedService(ctx, testgrpc.NewUnimplementedServiceClient(conn)) logger.Infoln("UnimplementedService done") case "pick_first_unary": interop.DoPickFirstUnary(ctx, tc) diff --git a/interop/test_utils.go b/interop/test_utils.go index f075f0753bbd..302071e34088 100644 --- a/interop/test_utils.go +++ b/interop/test_utils.go @@ -634,7 +634,7 @@ func DoSpecialStatusMessage(ctx context.Context, tc testgrpc.TestServiceClient, } // DoUnimplementedService attempts to call a method from an unimplemented service. -func DoUnimplementedService(tc testgrpc.UnimplementedServiceClient, ctx context.Context) { +func DoUnimplementedService(ctx context.Context, tc testgrpc.UnimplementedServiceClient) { _, err := tc.UnimplementedCall(ctx, &testpb.Empty{}) if status.Code(err) != codes.Unimplemented { logger.Fatalf("%v.UnimplementedCall() = _, %v, want _, %v", tc, status.Code(err), codes.Unimplemented) @@ -642,7 +642,7 @@ func DoUnimplementedService(tc testgrpc.UnimplementedServiceClient, ctx context. } // DoUnimplementedMethod attempts to call an unimplemented method. -func DoUnimplementedMethod(cc *grpc.ClientConn, ctx context.Context) { +func DoUnimplementedMethod(ctx context.Context, cc *grpc.ClientConn) { var req, reply proto.Message if err := cc.Invoke(ctx, "/grpc.testing.TestService/UnimplementedCall", req, reply); err == nil || status.Code(err) != codes.Unimplemented { logger.Fatalf("ClientConn.Invoke(_, _, _, _, _) = %v, want error code %s", err, codes.Unimplemented) diff --git a/vet.sh b/vet.sh index 1d3e307a214d..7a33c215b588 100755 --- a/vet.sh +++ b/vet.sh @@ -41,7 +41,7 @@ if [[ "$1" = "-install" ]]; then popd if [[ -z "${VET_SKIP_PROTO}" ]]; then if [[ "${GITHUB_ACTIONS}" = "true" ]]; then - PROTOBUF_VERSION=25.2 # a.k.a v4.22.0 in pb.go files. + PROTOBUF_VERSION=25.2 # a.k.a. v4.22.0 in pb.go files. PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip pushd /home/runner/go wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}