mirror of
https://github.com/containers/podman.git
synced 2025-09-18 15:54:49 +08:00
pkg: 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>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
@ -14,7 +15,6 @@ import (
|
||||
"github.com/containers/psgo"
|
||||
spec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/runtime-tools/generate"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
@ -53,7 +53,7 @@ func FindDeviceNodes() (map[string]string, error) {
|
||||
// We are a device node. Get major/minor.
|
||||
sysstat, ok := info.Sys().(*syscall.Stat_t)
|
||||
if !ok {
|
||||
return errors.Errorf("Could not convert stat output for use")
|
||||
return errors.New("could not convert stat output for use")
|
||||
}
|
||||
// We must typeconvert sysstat.Rdev from uint64->int to avoid constant overflow
|
||||
rdev := int(sysstat.Rdev)
|
||||
|
Reference in New Issue
Block a user