summaryrefslogtreecommitdiff
path: root/pkg/util/utils_windows.go
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@redhat.com>2022-07-06 09:48:36 +0200
committerSascha Grunert <sgrunert@redhat.com>2022-07-08 08:54:47 +0200
commita46f798831df06c472b288db7b34de8536a7ea5a (patch)
treec370fb0fc23b461691906e308b179a50e583228b /pkg/util/utils_windows.go
parent862cc42ddc11ff56b41be128182b748b0843dff3 (diff)
downloadpodman-a46f798831df06c472b288db7b34de8536a7ea5a.tar.gz
podman-a46f798831df06c472b288db7b34de8536a7ea5a.tar.bz2
podman-a46f798831df06c472b288db7b34de8536a7ea5a.zip
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>
Diffstat (limited to 'pkg/util/utils_windows.go')
-rw-r--r--pkg/util/utils_windows.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/util/utils_windows.go b/pkg/util/utils_windows.go
index b91680f7a..703e5472a 100644
--- a/pkg/util/utils_windows.go
+++ b/pkg/util/utils_windows.go
@@ -4,35 +4,36 @@
package util
import (
+ "errors"
+ "fmt"
"path/filepath"
"github.com/containers/storage/pkg/homedir"
- "github.com/pkg/errors"
)
var errNotImplemented = errors.New("not yet implemented")
// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 unified mode.
func IsCgroup2UnifiedMode() (bool, error) {
- return false, errors.Wrap(errNotImplemented, "IsCgroup2Unified")
+ return false, fmt.Errorf("IsCgroup2Unified: %w", errNotImplemented)
}
// GetContainerPidInformationDescriptors returns a string slice of all supported
// format descriptors of GetContainerPidInformation.
func GetContainerPidInformationDescriptors() ([]string, error) {
- return nil, errors.Wrap(errNotImplemented, "GetContainerPidInformationDescriptors")
+ return nil, fmt.Errorf("GetContainerPidInformationDescriptors: %w", errNotImplemented)
}
// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
// the pause process
func GetRootlessPauseProcessPidPath() (string, error) {
- return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath")
+ return "", fmt.Errorf("GetRootlessPauseProcessPidPath: %w", errNotImplemented)
}
// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
// the pause process
func GetRootlessPauseProcessPidPathGivenDir(unused string) (string, error) {
- return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath")
+ return "", fmt.Errorf("GetRootlessPauseProcessPidPath: %w", errNotImplemented)
}
// GetRuntimeDir returns the runtime directory