diff --git a/_examples/spinTipBar/main.go b/_examples/spinTipBar/main.go index 0717976..340ad97 100644 --- a/_examples/spinTipBar/main.go +++ b/_examples/spinTipBar/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "math/rand" "time" @@ -15,7 +16,9 @@ total := 100 name := "Single Bar:" bar := p.New(int64(total), - mpb.BarStyle().Tip(`-`, `\`, `|`, `/`), + mpb.BarStyle().Tip(`-`, `\`, `|`, `/`).TipMeta(func(s string) string { + return fmt.Sprint("\033[31m", s, "\033[0m") // red + }), mpb.PrependDecorators(decor.Name(name)), mpb.AppendDecorators(decor.Percentage()), )