mirror of
https://github.com/containers/podman.git
synced 2025-10-19 04:03:23 +08:00
vendor of containers/(common, storage, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
11
vendor/github.com/vbauerster/mpb/v8/decor/on_compete_or_on_abort.go
generated
vendored
11
vendor/github.com/vbauerster/mpb/v8/decor/on_compete_or_on_abort.go
generated
vendored
@ -8,3 +8,14 @@ package decor
|
||||
func OnCompleteOrOnAbort(decorator Decorator, message string) Decorator {
|
||||
return OnComplete(OnAbort(decorator, message), message)
|
||||
}
|
||||
|
||||
// OnCompleteMetaOrOnAbortMeta wrap decorator.
|
||||
// Provided fn is supposed to wrap output of given decorator
|
||||
// with meta information like ANSI escape codes for example.
|
||||
// Primary usage intention is to set SGR display attributes.
|
||||
//
|
||||
// `decorator` Decorator to wrap
|
||||
// `fn` func to apply meta information
|
||||
func OnCompleteMetaOrOnAbortMeta(decorator Decorator, fn func(string) string) Decorator {
|
||||
return OnCompleteMeta(OnAbortMeta(decorator, fn), fn)
|
||||
}
|
||||
|
Reference in New Issue
Block a user