mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
user errors.New if error formatting is not required
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
This commit is contained in:
@ -102,7 +102,7 @@ func getMon(pOpts *rbdVolume, credentials map[string]string) (string, error) {
|
||||
// if mons are set in secret, retrieve them
|
||||
if len(pOpts.MonValueFromSecret) == 0 {
|
||||
// yet another sanity check
|
||||
return "", fmt.Errorf("either monitors or monValueFromSecret must be set")
|
||||
return "", errors.New("either monitors or monValueFromSecret must be set")
|
||||
}
|
||||
val, ok := credentials[pOpts.MonValueFromSecret]
|
||||
if !ok {
|
||||
@ -344,7 +344,7 @@ func getSnapMon(pOpts *rbdSnapshot, credentials map[string]string) (string, erro
|
||||
// if mons are set in secret, retrieve them
|
||||
if len(pOpts.MonValueFromSecret) == 0 {
|
||||
// yet another sanity check
|
||||
return "", fmt.Errorf("either monitors or monValueFromSecret must be set")
|
||||
return "", errors.New("either monitors or monValueFromSecret must be set")
|
||||
}
|
||||
val, ok := credentials[pOpts.MonValueFromSecret]
|
||||
if !ok {
|
||||
|
Reference in New Issue
Block a user