Skip to content

Commit

Permalink
Merge pull request #19486 from ivanvc/address-govet-1.24-errors
Browse files Browse the repository at this point in the history
Address Go 1.24 govet errors
  • Loading branch information
ahrtr authored Feb 26, 2025
2 parents 47e764f + 16b1460 commit 6ecb6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions client/v3/retry_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ func isContextError(err error) bool {
func contextErrToGRPCErr(err error) error {
switch {
case errors.Is(err, context.DeadlineExceeded):
return status.Errorf(codes.DeadlineExceeded, err.Error())
return status.Error(codes.DeadlineExceeded, err.Error())
case errors.Is(err, context.Canceled):
return status.Errorf(codes.Canceled, err.Error())
return status.Error(codes.Canceled, err.Error())
default:
return status.Errorf(codes.Unknown, err.Error())
return status.Error(codes.Unknown, err.Error())
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/v3_lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ func acquireLeaseAndKey(clus *integration.Cluster, key string) (int64, error) {
return 0, err
}
if lresp.Error != "" {
return 0, fmt.Errorf(lresp.Error)
return 0, errors.New(lresp.Error)
}
// attach to key
put := &pb.PutRequest{Key: []byte(key), Lease: lresp.ID}
Expand Down

0 comments on commit 6ecb6fb

Please sign in to comment.