Codebase list golang-github-vbauerster-mpb / cc9f614
io examples update Vladimir Bauer 9 years ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
5555
5656 // create bar with appropriate decorators
5757 bar := p.AddBar(int(size)).
58 PrependCounters(mpb.UnitBytes, 19).
58 PrependCounters(mpb.UnitBytes, 20).
5959 PrependName(name, len(name)).
6060 AppendETA()
6161 // create proxy reader
3939 // may not complete, thus better always use even in single thread.
4040 p.Wg.Add(1)
4141
42 bar := p.AddBar(int(size)).PrependCounters(mpb.UnitBytes, 19).AppendETA()
42 bar := p.AddBar(int(size)).PrependCounters(mpb.UnitBytes, 20).AppendETA()
4343
4444 // create proxy reader
4545 reader := bar.ProxyReader(resp.Body)