summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/pods.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-05 16:10:12 +0000
committerGitHub <noreply@github.com>2022-07-05 16:10:12 +0000
commit39fc5d1f4f26f82ed1ca23d97f43924335c4c529 (patch)
treee0a54c6d0e3a1bc238cb5ef4a9316b55b39217ee /pkg/domain/infra/tunnel/pods.go
parent9539a89ee77682ed3f4d1d0be3b950523e2f2439 (diff)
parent251d91699de4e9aaab53ab6fea262d4b6bdaae8e (diff)
downloadpodman-39fc5d1f4f26f82ed1ca23d97f43924335c4c529.tar.gz
podman-39fc5d1f4f26f82ed1ca23d97f43924335c4c529.tar.bz2
podman-39fc5d1f4f26f82ed1ca23d97f43924335c4c529.zip
Merge pull request #14828 from saschagrunert/errors-libpod
libpod: switch to golang native error wrapping
Diffstat (limited to 'pkg/domain/infra/tunnel/pods.go')
-rw-r--r--pkg/domain/infra/tunnel/pods.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go
index 7b1fa231f..a524f9f89 100644
--- a/pkg/domain/infra/tunnel/pods.go
+++ b/pkg/domain/infra/tunnel/pods.go
@@ -2,12 +2,12 @@ package tunnel
import (
"context"
+ "errors"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/bindings/pods"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/util"
- "github.com/pkg/errors"
)
func (ic *ContainerEngine) PodExists(ctx context.Context, nameOrID string) (*entities.BoolReport, error) {
@@ -97,7 +97,7 @@ func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string,
func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opts entities.PodStopOptions) ([]*entities.PodStopReport, error) {
timeout := -1
foundPods, err := getPodsByContext(ic.ClientCtx, opts.All, namesOrIds)
- if err != nil && !(opts.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
+ if err != nil && !(opts.Ignore && errors.Is(err, define.ErrNoSuchPod)) {
return nil, err
}
if opts.Timeout != -1 {
@@ -164,7 +164,7 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op
func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, opts entities.PodRmOptions) ([]*entities.PodRmReport, error) {
foundPods, err := getPodsByContext(ic.ClientCtx, opts.All, namesOrIds)
- if err != nil && !(opts.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
+ if err != nil && !(opts.Ignore && errors.Is(err, define.ErrNoSuchPod)) {
return nil, err
}
reports := make([]*entities.PodRmReport, 0, len(foundPods))