refactor some examples
Vladimir Bauer
8 years ago
| 16 | 16 |
func main() {
|
| 17 | 17 |
doneWg := new(sync.WaitGroup)
|
| 18 | 18 |
p := mpb.New(mpb.WithWidth(64), mpb.WithWaitGroup(doneWg))
|
| 19 | |
numBars := 3
|
|
19 |
numBars := 4
|
| 20 | 20 |
|
| 21 | 21 |
var bars []*mpb.Bar
|
| 22 | 22 |
var downloadWgg []*sync.WaitGroup
|
| 25 | 25 |
// Display our static name with one space on the right
|
| 26 | 26 |
decor.StaticName(name, len(name)+1, decor.DidentRight),
|
| 27 | 27 |
// ETA decorator with width reservation of 3 runes
|
| 28 | |
decor.ETA(3, 0),
|
|
28 |
// decor.ETA(3, 0),
|
|
29 |
decor.OnComplete(decor.ETA(4, 0), "done", 0, 0),
|
| 29 | 30 |
),
|
| 30 | 31 |
mpb.AppendDecorators(
|
| 31 | 32 |
// Percentage decorator with width reservation of 5 runes
|