fix go vet error

This commit is contained in:
iamqizhao 2016-07-29 18:08:00 -07:00
parent bcbb6549ac
commit fc500c24f6
2 changed files with 3 additions and 3 deletions

View File

@ -328,7 +328,7 @@ func recv(p *parser, c Codec, s *transport.Stream, dc Decompressor, m interface{
if len(d) > maxMsgSize {
// TODO: Revisit the error code. Currently keep it consistent with java
// implementation.
return Errorf(codes.Internal, "grpc: server received a message of %d bytes exceeding %d limit", len(d), maxMsgSize)
return Errorf(codes.Internal, "grpc: received a message of %d bytes exceeding %d limit", len(d), maxMsgSize)
}
if err := c.Unmarshal(d, m); err != nil {
return Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err)

View File

@ -1100,7 +1100,7 @@ func testExceedMsgLimit(t *testing.T, e env) {
Payload: payload,
}
if _, err := tc.UnaryCall(context.Background(), req); err == nil || grpc.Code(err) != codes.Internal {
t.Fatalf("TestService/UnaryCall(_, _) = _, %v, want _, error code: ", err, codes.Internal)
t.Fatalf("TestService/UnaryCall(_, _) = _, %v, want _, error code: %d", err, codes.Internal)
}
stream, err := tc.FullDuplexCall(te.ctx)
@ -1127,7 +1127,7 @@ func testExceedMsgLimit(t *testing.T, e env) {
t.Fatalf("%v.Send(%v) = %v, want <nil>", stream, sreq, err)
}
if _, err := stream.Recv(); err == nil || grpc.Code(err) != codes.Internal {
t.Fatalf("%v.Recv() = _, %v, want _, error code: ", stream, err, codes.Internal)
t.Fatalf("%v.Recv() = _, %v, want _, error code: %d", stream, err, codes.Internal)
}
}