io examples update
Vladimir Bauer
9 years ago
| 55 | 55 |
|
| 56 | 56 |
// create bar with appropriate decorators
|
| 57 | 57 |
bar := p.AddBar(int(size)).
|
| 58 | |
PrependCounters(mpb.UnitBytes, 19).
|
|
58 |
PrependCounters(mpb.UnitBytes, 20).
|
| 59 | 59 |
PrependName(name, len(name)).
|
| 60 | 60 |
AppendETA()
|
| 61 | 61 |
// create proxy reader
|
| 39 | 39 |
// may not complete, thus better always use even in single thread.
|
| 40 | 40 |
p.Wg.Add(1)
|
| 41 | 41 |
|
| 42 | |
bar := p.AddBar(int(size)).PrependCounters(mpb.UnitBytes, 19).AppendETA()
|
|
42 |
bar := p.AddBar(int(size)).PrependCounters(mpb.UnitBytes, 20).AppendETA()
|
| 43 | 43 |
|
| 44 | 44 |
// create proxy reader
|
| 45 | 45 |
reader := bar.ProxyReader(resp.Body)
|