refactor: singleBar
Vladimir Bauer
9 years ago
| 20 | 20 | p.RefreshRate(120 * time.Millisecond) |
| 21 | 21 | |
| 22 | 22 | // Add a bar. You're not limited to just one bar, add many if you need. |
| 23 | bar := p.AddBar(100).PrependName("Single Bar:", 0).AppendPercentage() | |
| 23 | bar := p.AddBar(100).PrependName("Single Bar:", 0, 0).AppendPercentage(5, 0) | |
| 24 | 24 | |
| 25 | 25 | for i := 0; i < 100; i++ { |
| 26 | 26 | bar.Incr(1) // increment progress bar |