mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
fix(deps): update module github.com/vbauerster/mpb/v8 to v8.10.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
19
vendor/github.com/vbauerster/mpb/v8/bar_option.go
generated
vendored
19
vendor/github.com/vbauerster/mpb/v8/bar_option.go
generated
vendored
@@ -86,6 +86,25 @@ func BarFillerOnComplete(message string) BarOption {
|
||||
})
|
||||
}
|
||||
|
||||
// BarFillerClearOnAbort clears bar's filler on abort event.
|
||||
// It's shortcut for BarFillerOnAbort("").
|
||||
func BarFillerClearOnAbort() BarOption {
|
||||
return BarFillerOnAbort("")
|
||||
}
|
||||
|
||||
// BarFillerOnAbort replaces bar's filler with message, on abort event.
|
||||
func BarFillerOnAbort(message string) BarOption {
|
||||
return BarFillerMiddleware(func(base BarFiller) BarFiller {
|
||||
return BarFillerFunc(func(w io.Writer, st decor.Statistics) error {
|
||||
if st.Aborted {
|
||||
_, err := io.WriteString(w, message)
|
||||
return err
|
||||
}
|
||||
return base.Fill(w, st)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// BarFillerMiddleware provides a way to augment the underlying BarFiller.
|
||||
func BarFillerMiddleware(middle func(BarFiller) BarFiller) BarOption {
|
||||
if middle == nil {
|
||||
|
||||
Reference in New Issue
Block a user