From 4ccb0729b4f0a25eb53f62c2f6ca7f8925f0fe4e Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 18 Jan 2021 09:29:40 -0600 Subject: Add binding options for container|pod exists It turns out an options was added to container exists so it makes sense to have pods and container exists calls have an optional structure for options. Signed-off-by: baude --- pkg/domain/infra/tunnel/containers.go | 2 +- pkg/domain/infra/tunnel/images.go | 2 +- pkg/domain/infra/tunnel/pods.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 4ee623703..84a07f8e9 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -31,7 +31,7 @@ func (ic *ContainerEngine) ContainerRunlabel(ctx context.Context, label string, } func (ic *ContainerEngine) ContainerExists(ctx context.Context, nameOrID string, options entities.ContainerExistsOptions) (*entities.BoolReport, error) { - exists, err := containers.Exists(ic.ClientCtx, nameOrID, options.External) + exists, err := containers.Exists(ic.ClientCtx, nameOrID, new(containers.ExistsOptions).WithExternal(options.External)) return &entities.BoolReport{Value: exists}, err } diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 7a4aa1fbc..2d686b2aa 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -22,7 +22,7 @@ import ( ) func (ir *ImageEngine) Exists(_ context.Context, nameOrID string) (*entities.BoolReport, error) { - found, err := images.Exists(ir.ClientCtx, nameOrID) + found, err := images.Exists(ir.ClientCtx, nameOrID, nil) return &entities.BoolReport{Value: found}, err } diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go index aa7b92fa7..d61c95d57 100644 --- a/pkg/domain/infra/tunnel/pods.go +++ b/pkg/domain/infra/tunnel/pods.go @@ -12,7 +12,7 @@ import ( ) func (ic *ContainerEngine) PodExists(ctx context.Context, nameOrID string) (*entities.BoolReport, error) { - exists, err := pods.Exists(ic.ClientCtx, nameOrID) + exists, err := pods.Exists(ic.ClientCtx, nameOrID, nil) return &entities.BoolReport{Value: exists}, err } -- cgit v1.2.3-54-g00ecf