diff --git a/_examples/poplog/main.go b/_examples/poplog/main.go index 27da893..638ae2d 100644 --- a/_examples/poplog/main.go +++ b/_examples/poplog/main.go @@ -57,7 +57,8 @@ } func makeLogBar(msg string) mpb.FillerFunc { + limit := "%%.%ds" return func(w io.Writer, width int, st *decor.Statistics) { - fmt.Fprint(w, msg) + fmt.Fprintf(w, fmt.Sprintf(limit, width), msg) } }