fix(deps): update module github.com/vbauerster/mpb/v8 to v8.9.2

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-02-07 12:39:09 +00:00
committed by GitHub
parent 2cbb5fead9
commit 1d4c67751c
7 changed files with 33 additions and 34 deletions

2
go.mod
View File

@ -68,7 +68,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
github.com/stretchr/testify v1.10.0
github.com/vbauerster/mpb/v8 v8.9.1
github.com/vbauerster/mpb/v8 v8.9.2
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f
go.etcd.io/bbolt v1.3.11
golang.org/x/crypto v0.32.0

4
go.sum
View File

@ -516,8 +516,8 @@ github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/vbatts/tar-split v0.11.7 h1:ixZ93pO/GmvaZw4Vq9OwmfZK/kc2zKdPfu0B+gYqs3U=
github.com/vbatts/tar-split v0.11.7/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=
github.com/vbauerster/mpb/v8 v8.9.1 h1:LH5R3lXPfE2e3lIGxN7WNWv3Hl5nWO6LRi2B0L0ERHw=
github.com/vbauerster/mpb/v8 v8.9.1/go.mod h1:4XMvznPh8nfe2NpnDo1QTPvW9MVkUhbG90mPWvmOzcQ=
github.com/vbauerster/mpb/v8 v8.9.2 h1:kb91+D643Qg040bbICYtzpjgZ9ypVO/+sjv4Jcm6si4=
github.com/vbauerster/mpb/v8 v8.9.2/go.mod h1:hxS8Hz4C6ijnppDSIX6LjG8FYJSoPo9iIOcE53Zik0c=
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f h1:G5t3qYQ3YL2zMn2kFzRYIPk1EvDvMNV9pP+w+39VtzI=
github.com/vishvananda/netlink v1.3.1-0.20250128002108-7c2350bd140f/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=

View File

@ -117,7 +117,7 @@ func (b *Bar) ProxyWriter(w io.Writer) io.WriteCloser {
}
}
// ID returs id of the bar.
// ID returns id of the bar.
func (b *Bar) ID() int {
result := make(chan int)
select {
@ -180,7 +180,7 @@ func (b *Bar) TraverseDecorators(cb func(decor.Decorator)) {
}
// EnableTriggerComplete enables triggering complete event. It's effective
// only for bars which were constructed with `total <= 0`. If `curren >= total`
// only for bars which were constructed with `total <= 0`. If `current >= total`
// at the moment of call, complete event is triggered right away.
func (b *Bar) EnableTriggerComplete() {
select {
@ -493,7 +493,7 @@ func (b *Bar) wSyncTable() syncTable {
func (s *bState) draw(stat decor.Statistics) (_ io.Reader, err error) {
decorFiller := func(buf *bytes.Buffer, decorators []decor.Decorator) (err error) {
for _, d := range decorators {
// need to call Decor in any case becase of width synchronization
// need to call Decor in any case because of width synchronization
str, width := d.Decor(stat)
if err != nil {
continue

View File

@ -15,7 +15,7 @@ var (
_ AverageDecorator = (*averageETA)(nil)
)
// TimeNormalizer interface. Implementors could be passed into
// TimeNormalizer interface. Implementers could be passed into
// MovingAverageETA, in order to affect i.e. normalize its output.
type TimeNormalizer interface {
Normalize(time.Duration) time.Duration

View File

@ -28,14 +28,14 @@ const (
// appropriate size marker (KiB, MiB, GiB, TiB).
type SizeB1024 int64
func (self SizeB1024) Format(st fmt.State, verb rune) {
func (s SizeB1024) Format(f fmt.State, verb rune) {
prec := -1
switch verb {
case 'f', 'e', 'E':
prec = 6 // default prec of fmt.Printf("%f|%e|%E")
fallthrough
case 'b', 'g', 'G', 'x', 'X':
if p, ok := st.Precision(); ok {
if p, ok := f.Precision(); ok {
prec = p
}
default:
@ -44,24 +44,24 @@ func (self SizeB1024) Format(st fmt.State, verb rune) {
var unit SizeB1024
switch {
case self < _iKiB:
case s < _iKiB:
unit = _ib
case self < _iMiB:
case s < _iMiB:
unit = _iKiB
case self < _iGiB:
case s < _iGiB:
unit = _iMiB
case self < _iTiB:
case s < _iTiB:
unit = _iGiB
default:
unit = _iTiB
}
b := strconv.AppendFloat(make([]byte, 0, 24), float64(self)/float64(unit), byte(verb), prec, 64)
if st.Flag(' ') {
b := strconv.AppendFloat(make([]byte, 0, 24), float64(s)/float64(unit), byte(verb), prec, 64)
if f.Flag(' ') {
b = append(b, ' ')
}
b = append(b, []byte(unit.String())...)
_, err := st.Write(b)
_, err := f.Write(b)
if err != nil {
panic(err)
}
@ -80,14 +80,14 @@ const (
// appropriate size marker (KB, MB, GB, TB).
type SizeB1000 int64
func (self SizeB1000) Format(st fmt.State, verb rune) {
func (s SizeB1000) Format(f fmt.State, verb rune) {
prec := -1
switch verb {
case 'f', 'e', 'E':
prec = 6 // default prec of fmt.Printf("%f|%e|%E")
fallthrough
case 'b', 'g', 'G', 'x', 'X':
if p, ok := st.Precision(); ok {
if p, ok := f.Precision(); ok {
prec = p
}
default:
@ -96,24 +96,24 @@ func (self SizeB1000) Format(st fmt.State, verb rune) {
var unit SizeB1000
switch {
case self < _KB:
case s < _KB:
unit = _b
case self < _MB:
case s < _MB:
unit = _KB
case self < _GB:
case s < _GB:
unit = _MB
case self < _TB:
case s < _TB:
unit = _GB
default:
unit = _TB
}
b := strconv.AppendFloat(make([]byte, 0, 24), float64(self)/float64(unit), byte(verb), prec, 64)
if st.Flag(' ') {
b := strconv.AppendFloat(make([]byte, 0, 24), float64(s)/float64(unit), byte(verb), prec, 64)
if f.Flag(' ') {
b = append(b, ' ')
}
b = append(b, []byte(unit.String())...)
_, err := st.Write(b)
_, err := f.Write(b)
if err != nil {
panic(err)
}

View File

@ -17,8 +17,8 @@ import (
const defaultRefreshRate = 150 * time.Millisecond
const defaultHmQueueLength = 128
// DoneError represents use after `(*Progress).Wait()` error.
var DoneError = fmt.Errorf("%T instance can't be reused after %[1]T.Wait()", (*Progress)(nil))
// ErrDone represents use after `(*Progress).Wait()` error.
var ErrDone = fmt.Errorf("%T instance can't be reused after %[1]T.Wait()", (*Progress)(nil))
// Progress represents a container that renders one or more progress bars.
type Progress struct {
@ -39,7 +39,7 @@ type pState struct {
idCount int
popPriority int
// following are provided/overrided by user
// following are provided/overrode by user
hmQueueLen int
reqWidth int
refreshRate time.Duration
@ -149,7 +149,7 @@ func (p *Progress) MustAdd(total int64, filler BarFiller, options ...BarOption)
// Add creates a bar which renders itself by provided BarFiller.
// If `total <= 0` triggering complete event by increment methods
// is disabled. If called after `(*Progress).Wait()` then
// `(nil, DoneError)` is returned.
// `(nil, ErrDone)` is returned.
func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Bar, error) {
if filler == nil {
filler = NopStyle().Build()
@ -171,7 +171,7 @@ func (p *Progress) Add(total int64, filler BarFiller, options ...BarOption) (*Ba
}:
return <-ch, nil
case <-p.done:
return nil, DoneError
return nil, ErrDone
}
}
@ -205,8 +205,7 @@ func (p *Progress) UpdateBarPriority(b *Bar, priority int, lazy bool) {
// Write is implementation of io.Writer.
// Writing to `*Progress` will print lines above a running bar.
// Writes aren't flushed immediately, but at next refresh cycle.
// If called after `(*Progress).Wait()` then `(0, DoneError)`
// is returned.
// If called after `(*Progress).Wait()` then `(0, ErrDone)` is returned.
func (p *Progress) Write(b []byte) (int, error) {
type result struct {
n int
@ -221,7 +220,7 @@ func (p *Progress) Write(b []byte) (int, error) {
res := <-ch
return res.n, res.err
case <-p.done:
return 0, DoneError
return 0, ErrDone
}
}

2
vendor/modules.txt vendored
View File

@ -1110,7 +1110,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.9.1
# github.com/vbauerster/mpb/v8 v8.9.2
## explicit; go 1.17
github.com/vbauerster/mpb/v8
github.com/vbauerster/mpb/v8/cwriter