mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
ci: non-constant format string (govet)
Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -73,9 +73,9 @@ func (ekrs *EncryptionKeyRotationServer) EncryptionKeyRotate(
|
||||
err = status.Errorf(codes.NotFound, "volume ID %s not found", volID)
|
||||
case errors.Is(err, util.ErrPoolNotFound):
|
||||
log.ErrorLog(ctx, "failed to get backend volume for %s: %v", volID, err)
|
||||
err = status.Errorf(codes.NotFound, err.Error())
|
||||
err = status.Error(codes.NotFound, err.Error())
|
||||
default:
|
||||
err = status.Errorf(codes.Internal, err.Error())
|
||||
err = status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return nil, err
|
||||
|
@ -123,7 +123,7 @@ func getForceOption(ctx context.Context, parameters map[string]string) (bool, er
|
||||
}
|
||||
force, err := strconv.ParseBool(val)
|
||||
if err != nil {
|
||||
return false, status.Errorf(codes.Internal, err.Error())
|
||||
return false, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return force, nil
|
||||
@ -636,7 +636,7 @@ func (rs *ReplicationServer) ResyncVolume(ctx context.Context,
|
||||
// it takes time for this operation.
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
return nil, status.Errorf(codes.Aborted, err.Error())
|
||||
return nil, status.Error(codes.Aborted, err.Error())
|
||||
}
|
||||
|
||||
if info.GetState() != librbd.MirrorImageEnabled.String() {
|
||||
@ -832,11 +832,11 @@ func (rs *ReplicationServer) GetVolumeReplicationInfo(ctx context.Context,
|
||||
if err != nil {
|
||||
switch {
|
||||
case errors.Is(err, corerbd.ErrImageNotFound):
|
||||
err = status.Errorf(codes.NotFound, err.Error())
|
||||
err = status.Error(codes.NotFound, err.Error())
|
||||
case errors.Is(err, util.ErrPoolNotFound):
|
||||
err = status.Errorf(codes.NotFound, err.Error())
|
||||
err = status.Error(codes.NotFound, err.Error())
|
||||
default:
|
||||
err = status.Errorf(codes.Internal, err.Error())
|
||||
err = status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user