summaryrefslogtreecommitdiff
path: root/libpod/volume_internal.go
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@redhat.com>2022-07-05 11:42:22 +0200
committerSascha Grunert <sgrunert@redhat.com>2022-07-05 16:06:32 +0200
commit251d91699de4e9aaab53ab6fea262d4b6bdaae8e (patch)
tree1995c85a69f48bf129565ca60ea0b3d6205a04b4 /libpod/volume_internal.go
parent340eeed0cb20855f1e6d2670704cfe67df3314f6 (diff)
downloadpodman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.tar.gz
podman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.tar.bz2
podman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.zip
libpod: switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Diffstat (limited to 'libpod/volume_internal.go')
-rw-r--r--libpod/volume_internal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go
index 24522c0f9..43c3f9b0b 100644
--- a/libpod/volume_internal.go
+++ b/libpod/volume_internal.go
@@ -1,11 +1,11 @@
package libpod
import (
+ "fmt"
"os"
"path/filepath"
"github.com/containers/podman/v4/libpod/define"
- "github.com/pkg/errors"
)
// Creates a new volume
@@ -90,7 +90,7 @@ func (v *Volume) save() error {
func (v *Volume) refresh() error {
lock, err := v.runtime.lockManager.AllocateAndRetrieveLock(v.config.LockID)
if err != nil {
- return errors.Wrapf(err, "acquiring lock %d for volume %s", v.config.LockID, v.Name())
+ return fmt.Errorf("acquiring lock %d for volume %s: %w", v.config.LockID, v.Name(), err)
}
v.lock = lock