Codebase list golang-github-vbauerster-mpb / 357d30f
fix examples Vladimir Bauer 6 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
6464 func makeLogBar(msg string) mpb.BarFiller {
6565 limit := "%%.%ds"
6666 return mpb.BarFillerFunc(func(w io.Writer, _ int, st decor.Statistics) {
67 fmt.Fprintf(w, fmt.Sprintf(limit, st.TermWidth-st.OccupiedWidth), msg)
67 fmt.Fprintf(w, fmt.Sprintf(limit, st.AvailableWidth), msg)
6868 })
6969 }
100100 default:
101101 }
102102 if msg != nil {
103 limitFmt := fmt.Sprintf("%%.%ds", st.TermWidth-st.OccupiedWidth)
103 limitFmt := fmt.Sprintf("%%.%ds", st.AvailableWidth)
104104 fmt.Fprintf(w, limitFmt, *msg)
105105 nextCh <- struct{}{}
106106 } else {