vendor of containers/(common, storage, image)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-09-11 13:52:23 -04:00
parent cbb955811c
commit 75b4679a73
115 changed files with 15955 additions and 3029 deletions

View File

@ -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)
}