poplog example: limit fmt
Vladimir Bauer
7 years ago
| 56 | 56 |
}
|
| 57 | 57 |
|
| 58 | 58 |
func makeLogBar(msg string) mpb.FillerFunc {
|
|
59 |
limit := "%%.%ds"
|
| 59 | 60 |
return func(w io.Writer, width int, st *decor.Statistics) {
|
| 60 | |
fmt.Fprint(w, msg)
|
|
61 |
fmt.Fprintf(w, fmt.Sprintf(limit, width), msg)
|
| 61 | 62 |
}
|
| 62 | 63 |
}
|