mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: Modifies Wrapcheck linter
Wrapcheck is a simple Go linter to check that errors from external packages are wrapped during return to help identify the error source during debugging. This commit addresses the wrapcheck error Updates:#2025 Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
@ -157,12 +157,12 @@ func getImageInfoFromPVC(pvcNamespace, pvcName string, f *framework.Framework) (
|
||||
c := f.ClientSet.CoreV1()
|
||||
pvc, err := c.PersistentVolumeClaims(pvcNamespace).Get(context.TODO(), pvcName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return imageData, err
|
||||
return imageData, fmt.Errorf("failed to get pvc: %w", err)
|
||||
}
|
||||
|
||||
pv, err := c.PersistentVolumes().Get(context.TODO(), pvc.Spec.VolumeName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return imageData, err
|
||||
return imageData, fmt.Errorf("failed to get pv: %w", err)
|
||||
}
|
||||
|
||||
imageIDRegex := regexp.MustCompile(`(\w+\-?){5}$`)
|
||||
|
Reference in New Issue
Block a user