refactor: io/multiple example
Vladimir Bauer
9 years ago
| 59 | 59 | |
| 60 | 60 | // create bar with appropriate decorators |
| 61 | 61 | bar := p.AddBar(size). |
| 62 | PrependName(name, len(name)). | |
| 63 | PrependCounters(mpb.UnitBytes, 20). | |
| 64 | AppendETA(-6) | |
| 62 | PrependName(name, 0, 0). | |
| 63 | PrependCounters(mpb.UnitBytes, 18, mpb.DwidthSync|mpb.DextraSpace). | |
| 64 | AppendETA(5, mpb.DwidthSync) | |
| 65 | ||
| 65 | 66 | // create proxy reader |
| 66 | 67 | reader := bar.ProxyReader(resp.Body) |
| 67 | 68 | // and copy from reader |