Skip to content

Commit 6ecb6fb

Browse files
authored
Merge pull request #19486 from ivanvc/address-govet-1.24-errors
Address Go 1.24 govet errors
2 parents 47e764f + 16b1460 commit 6ecb6fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/v3/retry_interceptor.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,11 @@ func isContextError(err error) bool {
351351
func contextErrToGRPCErr(err error) error {
352352
switch {
353353
case errors.Is(err, context.DeadlineExceeded):
354-
return status.Errorf(codes.DeadlineExceeded, err.Error())
354+
return status.Error(codes.DeadlineExceeded, err.Error())
355355
case errors.Is(err, context.Canceled):
356-
return status.Errorf(codes.Canceled, err.Error())
356+
return status.Error(codes.Canceled, err.Error())
357357
default:
358-
return status.Errorf(codes.Unknown, err.Error())
358+
return status.Error(codes.Unknown, err.Error())
359359
}
360360
}
361361

tests/integration/v3_lease_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ func acquireLeaseAndKey(clus *integration.Cluster, key string) (int64, error) {
10311031
return 0, err
10321032
}
10331033
if lresp.Error != "" {
1034-
return 0, fmt.Errorf(lresp.Error)
1034+
return 0, errors.New(lresp.Error)
10351035
}
10361036
// attach to key
10371037
put := &pb.PutRequest{Key: []byte(key), Lease: lresp.ID}

0 commit comments

Comments
 (0)