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:
@ -16,6 +16,8 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
|
||||
clientConfig "sigs.k8s.io/controller-runtime/pkg/client/config"
|
||||
@ -44,7 +46,7 @@ func addToManager(mgr manager.Manager, config Config) error {
|
||||
for _, c := range ControllerList {
|
||||
err := c.Add(mgr, config)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("failed to add: %w", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
@ -78,7 +78,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
|
||||
// Watch for changes to PersistentVolumes
|
||||
err = c.Watch(&source.Kind{Type: &corev1.PersistentVolume{}}, &handler.EnqueueRequestForObject{})
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("failed to watch the changes: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user