Same comment as in readme
Vladimir Bauer
8 years ago
| 19 | 19 | |
| 20 | 20 | total := 100 |
| 21 | 21 | name := "Single Bar:" |
| 22 | // Add a bar. You're not limited to just one bar, add many if you need. | |
| 22 | // Add a bar | |
| 23 | // You're not limited to just a single bar, add as many as you need | |
| 23 | 24 | bar := p.AddBar(int64(total), |
| 24 | 25 | // Prepending decorators |
| 25 | 26 | mpb.PrependDecorators( |
| 26 | 27 | // Name decorator with minWidth and no width sync options |
| 27 | 28 | decor.Name(name, len(name), 0), |
| 28 | // ETA decorator with minWidth and width sync options DwidthSync|DextraSpace | |
| 29 | // ETA decorator with minWidth and width sync options | |
| 30 | // DSyncSpace is shortcut for DwidthSync|DextraSpace | |
| 29 | 31 | decor.ETA(4, decor.DSyncSpace), |
| 30 | 32 | ), |
| 31 | 33 | // Appending decorators |