From b7380a7c367246fa50b2380a99dbff39c4dc78d0 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 10 Jan 2022 13:47:12 +0100 Subject: vendor c/common Also update the e2e pull test to account for the changes when pulling from the dir transport. Images pulled via the dir transport are not tagged anymore; the path is not a reliable source. Signed-off-by: Valentin Rothberg --- vendor/github.com/vbauerster/mpb/v7/container_option.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/vbauerster/mpb/v7/container_option.go') diff --git a/vendor/github.com/vbauerster/mpb/v7/container_option.go b/vendor/github.com/vbauerster/mpb/v7/container_option.go index a858c3c51..e523a1759 100644 --- a/vendor/github.com/vbauerster/mpb/v7/container_option.go +++ b/vendor/github.com/vbauerster/mpb/v7/container_option.go @@ -5,8 +5,6 @@ import ( "io/ioutil" "sync" "time" - - "github.com/vbauerster/mpb/v7/internal" ) // ContainerOption is a func option to alter default behavior of a bar @@ -101,9 +99,12 @@ func PopCompletedMode() ContainerOption { } } -// ContainerOptional will invoke provided option only when pick is true. -func ContainerOptional(option ContainerOption, pick bool) ContainerOption { - return ContainerOptOn(option, internal.Predicate(pick)) +// ContainerOptional will invoke provided option only when cond is true. +func ContainerOptional(option ContainerOption, cond bool) ContainerOption { + if cond { + return option + } + return nil } // ContainerOptOn will invoke provided option only when higher order -- cgit v1.2.3-54-g00ecf