.*: fix minor linter issues (#6958)

This commit is contained in:
Arvind Bright 2024-02-01 13:49:00 -08:00 committed by GitHub
parent 891f8da1d6
commit cd69b5d0af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

2
vet.sh
View File

@ -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}