mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: use %w to format errors
Use %w instead of %v to format errors. Updates: #1586 Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
@ -33,11 +33,11 @@ func getSnapshot(path string) snapapi.VolumeSnapshot {
|
||||
func newSnapshotClient() (*snapclient.SnapshotV1Client, error) {
|
||||
config, err := framework.LoadConfig()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating client: %v", err.Error())
|
||||
return nil, fmt.Errorf("error creating client: %w", err)
|
||||
}
|
||||
c, err := snapclient.NewForConfig(config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error creating snapshot client: %v", err.Error())
|
||||
return nil, fmt.Errorf("error creating snapshot client: %w", err)
|
||||
}
|
||||
return c, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user