Skip to content

Commit fc500c2

Browse files
committed
fix go vet error
1 parent bcbb654 commit fc500c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rpc_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func recv(p *parser, c Codec, s *transport.Stream, dc Decompressor, m interface{
328328
if len(d) > maxMsgSize {
329329
// TODO: Revisit the error code. Currently keep it consistent with java
330330
// implementation.
331-
return Errorf(codes.Internal, "grpc: server received a message of %d bytes exceeding %d limit", len(d), maxMsgSize)
331+
return Errorf(codes.Internal, "grpc: received a message of %d bytes exceeding %d limit", len(d), maxMsgSize)
332332
}
333333
if err := c.Unmarshal(d, m); err != nil {
334334
return Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err)

test/end2end_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ func testExceedMsgLimit(t *testing.T, e env) {
11001100
Payload: payload,
11011101
}
11021102
if _, err := tc.UnaryCall(context.Background(), req); err == nil || grpc.Code(err) != codes.Internal {
1103-
t.Fatalf("TestService/UnaryCall(_, _) = _, %v, want _, error code: ", err, codes.Internal)
1103+
t.Fatalf("TestService/UnaryCall(_, _) = _, %v, want _, error code: %d", err, codes.Internal)
11041104
}
11051105

11061106
stream, err := tc.FullDuplexCall(te.ctx)
@@ -1127,7 +1127,7 @@ func testExceedMsgLimit(t *testing.T, e env) {
11271127
t.Fatalf("%v.Send(%v) = %v, want <nil>", stream, sreq, err)
11281128
}
11291129
if _, err := stream.Recv(); err == nil || grpc.Code(err) != codes.Internal {
1130-
t.Fatalf("%v.Recv() = _, %v, want _, error code: ", stream, err, codes.Internal)
1130+
t.Fatalf("%v.Recv() = _, %v, want _, error code: %d", stream, err, codes.Internal)
11311131
}
11321132
}
11331133

0 commit comments

Comments
 (0)