mirror of
https://github.com/containers/podman.git
synced 2025-05-21 17:16:22 +08:00
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.7.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
6
vendor/github.com/vbauerster/mpb/v8/README.md
generated
vendored
6
vendor/github.com/vbauerster/mpb/v8/README.md
generated
vendored
@ -42,11 +42,9 @@ func main() {
|
||||
mpb.BarStyle().Lbound("╢").Filler("▌").Tip("▌").Padding("░").Rbound("╟"),
|
||||
mpb.PrependDecorators(
|
||||
// display our name with one space on the right
|
||||
decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}),
|
||||
decor.Name(name, decor.WC{C: decor.DindentRight | decor.DextraSpace}),
|
||||
// replace ETA decorator with "done" message, OnComplete event
|
||||
decor.OnComplete(
|
||||
decor.AverageETA(decor.ET_STYLE_GO, decor.WC{W: 4}), "done",
|
||||
),
|
||||
decor.OnComplete(decor.AverageETA(decor.ET_STYLE_GO), "done"),
|
||||
),
|
||||
mpb.AppendDecorators(decor.Percentage()),
|
||||
)
|
||||
|
27
vendor/github.com/vbauerster/mpb/v8/decor/decorator.go
generated
vendored
27
vendor/github.com/vbauerster/mpb/v8/decor/decorator.go
generated
vendored
@ -8,29 +8,27 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// DidentRight bit specifies identation direction.
|
||||
// DindentRight sets indentation from right to left.
|
||||
//
|
||||
// |foo |b | With DidentRight
|
||||
// | foo| b| Without DidentRight
|
||||
DidentRight = 1 << iota
|
||||
// |foo |b | DindentRight is set
|
||||
// | foo| b| DindentRight is not set
|
||||
DindentRight = 1 << iota
|
||||
|
||||
// DextraSpace bit adds extra space, makes sense with DSyncWidth only.
|
||||
// When DidentRight bit set, the space will be added to the right,
|
||||
// otherwise to the left.
|
||||
// DextraSpace bit adds extra indentation space.
|
||||
DextraSpace
|
||||
|
||||
// DSyncWidth bit enables same column width synchronization.
|
||||
// Effective with multiple bars only.
|
||||
DSyncWidth
|
||||
|
||||
// DSyncWidthR is shortcut for DSyncWidth|DidentRight
|
||||
DSyncWidthR = DSyncWidth | DidentRight
|
||||
// DSyncWidthR is shortcut for DSyncWidth|DindentRight
|
||||
DSyncWidthR = DSyncWidth | DindentRight
|
||||
|
||||
// DSyncSpace is shortcut for DSyncWidth|DextraSpace
|
||||
DSyncSpace = DSyncWidth | DextraSpace
|
||||
|
||||
// DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DidentRight
|
||||
DSyncSpaceR = DSyncWidth | DextraSpace | DidentRight
|
||||
// DSyncSpaceR is shortcut for DSyncWidth|DextraSpace|DindentRight
|
||||
DSyncSpaceR = DSyncWidth | DextraSpace | DindentRight
|
||||
)
|
||||
|
||||
// TimeStyle enum.
|
||||
@ -143,11 +141,10 @@ func (wc WC) Format(str string) (string, int) {
|
||||
viewWidth := runewidth.StringWidth(str)
|
||||
if wc.W > viewWidth {
|
||||
viewWidth = wc.W
|
||||
} else if (wc.C & DextraSpace) != 0 {
|
||||
viewWidth++
|
||||
}
|
||||
if (wc.C & DSyncWidth) != 0 {
|
||||
if (wc.C & DextraSpace) != 0 {
|
||||
viewWidth++
|
||||
}
|
||||
wc.wsync <- viewWidth
|
||||
viewWidth = <-wc.wsync
|
||||
}
|
||||
@ -156,7 +153,7 @@ func (wc WC) Format(str string) (string, int) {
|
||||
|
||||
// Init initializes width related config.
|
||||
func (wc *WC) Init() WC {
|
||||
if (wc.C & DidentRight) != 0 {
|
||||
if (wc.C & DindentRight) != 0 {
|
||||
wc.fill = runewidth.FillRight
|
||||
} else {
|
||||
wc.fill = runewidth.FillLeft
|
||||
|
Reference in New Issue
Block a user