diff options
author | Sascha Grunert <sgrunert@redhat.com> | 2022-07-05 11:42:22 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@redhat.com> | 2022-07-05 16:06:32 +0200 |
commit | 251d91699de4e9aaab53ab6fea262d4b6bdaae8e (patch) | |
tree | 1995c85a69f48bf129565ca60ea0b3d6205a04b4 /pkg/domain/infra/abi/terminal | |
parent | 340eeed0cb20855f1e6d2670704cfe67df3314f6 (diff) | |
download | podman-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 'pkg/domain/infra/abi/terminal')
-rw-r--r-- | pkg/domain/infra/abi/terminal/sigproxy_linux.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/terminal/sigproxy_linux.go b/pkg/domain/infra/abi/terminal/sigproxy_linux.go index e02c0532c..16d345f06 100644 --- a/pkg/domain/infra/abi/terminal/sigproxy_linux.go +++ b/pkg/domain/infra/abi/terminal/sigproxy_linux.go @@ -1,6 +1,7 @@ package terminal import ( + "errors" "os" "syscall" @@ -8,7 +9,6 @@ import ( "github.com/containers/podman/v4/libpod/define" "github.com/containers/podman/v4/libpod/shutdown" "github.com/containers/podman/v4/pkg/signal" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -39,7 +39,7 @@ func ProxySignals(ctr *libpod.Container) { } if err := ctr.Kill(uint(s.(syscall.Signal))); err != nil { - if errors.Cause(err) == define.ErrCtrStateInvalid { + if errors.Is(err, define.ErrCtrStateInvalid) { logrus.Infof("Ceasing signal forwarding to container %s as it has stopped", ctr.ID()) } else { logrus.Errorf("forwarding signal %d to container %s: %v", s, ctr.ID(), err) |