example test upd
Vladimir Bauer
5 years ago
| 17 | 17 | total := 100 |
| 18 | 18 | name := "Single Bar:" |
| 19 | 19 | // adding a single bar, which will inherit container's width |
| 20 | bar := p.AddBar(int64(total), | |
| 21 | // override DefaultBarStyle, which is "[=>-]<+" | |
| 22 | mpb.BarStyle("╢▌▌░╟"), | |
| 20 | bar := p.Add(int64(total), | |
| 21 | // progress bar filler with customized style | |
| 22 | mpb.NewBarFiller("╢▌▌░╟"), | |
| 23 | 23 | mpb.PrependDecorators( |
| 24 | 24 | // display our name with one space on the right |
| 25 | 25 | decor.Name(name, decor.WC{W: len(name) + 1, C: decor.DidentRight}), |