extend proxy reader to ReadCloser
Vladimir Bauer
7 years ago
| 145 | 145 |
}
|
| 146 | 146 |
|
| 147 | 147 |
// ProxyReader wraps r with metrics required for progress tracking.
|
| 148 | |
func (b *Bar) ProxyReader(r io.Reader) io.Reader {
|
|
148 |
func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {
|
| 149 | 149 |
if r == nil {
|
| 150 | 150 |
panic("expect io.Reader, got nil")
|
| 151 | 151 |
}
|