use custom bar format
Vladimir Bauer
9 years ago
| 14 | 14 | // If you don't plan to cancel, feed with nil |
| 15 | 15 | // otherwise provide context.Context, see cancel example |
| 16 | 16 | p := mpb.New(nil) |
| 17 | // Set custom format, the default one is "[=>-]" | |
| 18 | p.Format("╢▌▌░╟") | |
| 19 | ||
| 17 | 20 | bar := p.AddBar(100).PrependName(name, 0).AppendPercentage() |
| 18 | 21 | |
| 19 | 22 | for i := 0; i < 100; i++ { |