Codebase list golang-github-vbauerster-mpb / 06fbf8d
simple example: show sync width Vladimir Bauer 9 years ago
3 changed file(s) with 8 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
7575 name := fmt.Sprintf("Bar#%d:", i)
7676 bar := p.AddBar(100).
7777 PrependName(name, len(name), 0).
78 AppendPercentage(5, 0)
78 // Prepend Percentage decorator and sync width
79 PrependPercentage(3, mpb.DwidthSync|mpb.DextraSpace).
80 // Append ETA and don't sync width
81 AppendETA(2, 0)
7982 go func() {
8083 defer wg.Done()
8184 // you can p.AddBar() here, but ordering will be non deterministic
Binary diff not shown
1616 name := fmt.Sprintf("Bar#%d:", i)
1717 bar := p.AddBar(100).
1818 PrependName(name, len(name), 0).
19 AppendPercentage(5, 0)
19 // Prepend Percentage decorator and sync width
20 PrependPercentage(3, mpb.DwidthSync|mpb.DextraSpace).
21 // Append ETA and don't sync width
22 AppendETA(2, 0)
2023 go func() {
2124 defer wg.Done()
2225 // you can p.AddBar() here, but ordering will be non deterministic