From 6f9f395b3c65e6ed12a41b737d21bd6a39e67033 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 12:59:15 +0000 Subject: [PATCH] build(deps): bump github.com/vbauerster/mpb/v8 from 8.2.1 to 8.3.0 Bumps [github.com/vbauerster/mpb/v8](https://github.com/vbauerster/mpb) from 8.2.1 to 8.3.0. - [Release notes](https://github.com/vbauerster/mpb/releases) - [Commits](https://github.com/vbauerster/mpb/compare/v8.2.1...v8.3.0) --- updated-dependencies: - dependency-name: github.com/vbauerster/mpb/v8 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +-- .../github.com/vbauerster/mpb/v8/progress.go | 27 ++++++++++++++----- vendor/modules.txt | 2 +- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index c7659e3b19..15390d276b 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/ulikunitz/xz v0.5.11 - github.com/vbauerster/mpb/v8 v8.2.1 + github.com/vbauerster/mpb/v8 v8.3.0 github.com/vishvananda/netlink v1.2.1-beta.2 go.etcd.io/bbolt v1.3.7 golang.org/x/net v0.8.0 diff --git a/go.sum b/go.sum index a95f42e76d..c49c5f49d0 100644 --- a/go.sum +++ b/go.sum @@ -1001,8 +1001,8 @@ github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= -github.com/vbauerster/mpb/v8 v8.2.1 h1:7V3DLM8rkK4BpgDUqu8l/ExBDfAfMbWOECW5phzVHx0= -github.com/vbauerster/mpb/v8 v8.2.1/go.mod h1:DqGePwrIYW6Bs5pXaGAuGgP0PYgu5VZKIjfLZkOsdZw= +github.com/vbauerster/mpb/v8 v8.3.0 h1:xw2eMJ6v5NP8Rd7yOVzU6OqnRPrS1yWAoLTrWe7W4Nc= +github.com/vbauerster/mpb/v8 v8.3.0/go.mod h1:bngtYUAu25QGxcYYglsF6oyoHlC9Yhh582xF9LjfmL4= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= diff --git a/vendor/github.com/vbauerster/mpb/v8/progress.go b/vendor/github.com/vbauerster/mpb/v8/progress.go index 827c66cf6c..9bb557ee45 100644 --- a/vendor/github.com/vbauerster/mpb/v8/progress.go +++ b/vendor/github.com/vbauerster/mpb/v8/progress.go @@ -128,13 +128,26 @@ func (p *Progress) AddSpinner(total int64, options ...BarOption) *Bar { // New creates a bar by calling `Build` method on provided `BarFillerBuilder`. func (p *Progress) New(total int64, builder BarFillerBuilder, options ...BarOption) *Bar { - return p.AddFiller(total, builder.Build(), options...) + return p.MustAdd(total, builder.Build(), options...) } -// AddFiller creates a bar which renders itself by provided filler. -// If `total <= 0` triggering complete event by increment methods is disabled. -// Panics if *Progress instance is done, i.e. called after (*Progress).Wait(). -func (p *Progress) AddFiller(total int64, filler BarFiller, options ...BarOption) *Bar { +// MustAdd creates a bar which renders itself by provided BarFiller. +// If `total <= 0` triggering complete event by increment methods is +// disabled. Panics if *Progress instance is done, i.e. called after +// (*Progress).Wait(). +func (p *Progress) MustAdd(total int64, filler BarFiller, options ...BarOption) *Bar { + bar, err := p.Add(total, filler, options...) + if err != nil { + panic(err) + } + return bar +} + +// Add creates a bar which renders itself by provided BarFiller. +// If `total <= 0` triggering complete event by increment methods +// is disabled. If *Progress instance is done, i.e. called after +// (*Progress).Wait(), return error == DoneError. +func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Bar, error) { if filler == nil { filler = NopStyle().Build() } @@ -168,9 +181,9 @@ func (p *Progress) AddFiller(total int64, filler BarFiller, options ...BarOption bs.shutdownListeners = append(bs.shutdownListeners, d) } }) - return bar + return bar, nil case <-p.done: - panic(DoneError) + return nil, DoneError } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 91f130df7c..93ddcce9ba 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -864,7 +864,7 @@ github.com/ulikunitz/xz/lzma github.com/vbatts/tar-split/archive/tar github.com/vbatts/tar-split/tar/asm github.com/vbatts/tar-split/tar/storage -# github.com/vbauerster/mpb/v8 v8.2.1 +# github.com/vbauerster/mpb/v8 v8.3.0 ## explicit; go 1.17 github.com/vbauerster/mpb/v8 github.com/vbauerster/mpb/v8/cwriter