list/tree: Add an experimental warning

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-08-16 13:50:03 +02:00
parent b1a08f7841
commit d417d06682
No known key found for this signature in database
GPG Key ID: B85EFCFE26DEF92A
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,7 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error {
width = 20 width = 20
} }
warningColor := aec.LightYellowF
headerColor := aec.NewBuilder(aec.DefaultF, aec.Bold).ANSI headerColor := aec.NewBuilder(aec.DefaultF, aec.Bold).ANSI
topNameColor := aec.NewBuilder(aec.BlueF, aec.Underline, aec.Bold).ANSI topNameColor := aec.NewBuilder(aec.BlueF, aec.Underline, aec.Bold).ANSI
normalColor := aec.NewBuilder(aec.DefaultF).ANSI normalColor := aec.NewBuilder(aec.DefaultF).ANSI
@ -127,8 +128,11 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error {
topNameColor = noColor{} topNameColor = noColor{}
normalColor = noColor{} normalColor = noColor{}
greenColor = noColor{} greenColor = noColor{}
warningColor = noColor{}
} }
_, _ = fmt.Fprintln(out, warningColor.Apply("WARNING: This is an experimental feature. The output may change and shouldn't be depended on."))
columns := []imgColumn{ columns := []imgColumn{
{ {
Title: "Image", Title: "Image",