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:
@ -68,7 +68,7 @@ func createConfigMap(pluginPath string, c kubernetes.Interface, f *framework.Fra
|
||||
if err == nil {
|
||||
_, updateErr := c.CoreV1().ConfigMaps(cephCSINamespace).Update(context.TODO(), &cm, metav1.UpdateOptions{})
|
||||
if updateErr != nil {
|
||||
return updateErr
|
||||
return fmt.Errorf("failed to update configmap: %w", updateErr)
|
||||
}
|
||||
}
|
||||
if apierrs.IsNotFound(err) {
|
||||
@ -116,5 +116,8 @@ func createCustomConfigMap(c kubernetes.Interface, pluginPath string, subvolgrpI
|
||||
cm.Namespace = cephCSINamespace
|
||||
// since a configmap is already created, update the existing configmap
|
||||
_, err = c.CoreV1().ConfigMaps(cephCSINamespace).Update(context.TODO(), &cm, metav1.UpdateOptions{})
|
||||
return err
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update configmap: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user