fix example
Vladimir Bauer
6 years ago
| 63 | 63 | |
| 64 | 64 | func makeLogBar(msg string) mpb.BarFiller { |
| 65 | 65 | limit := "%%.%ds" |
| 66 | return mpb.BarFillerFunc(func(w io.Writer, width int, st decor.Statistics) { | |
| 67 | fmt.Fprintf(w, fmt.Sprintf(limit, width), msg) | |
| 66 | return mpb.BarFillerFunc(func(w io.Writer, _ int, st decor.Statistics) { | |
| 67 | fmt.Fprintf(w, fmt.Sprintf(limit, st.TermWidth-st.OccupiedWidth), msg) | |
| 68 | 68 | }) |
| 69 | 69 | } |