Codebase list golang-github-vbauerster-mpb / bc84b84
don't panic Vladimir Bauer 7 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
160160 // ProxyReader wraps r with metrics required for progress tracking.
161161 func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {
162162 if r == nil {
163 panic("expect io.Reader, got nil")
163 return nil
164164 }
165165 rc, ok := r.(io.ReadCloser)
166166 if !ok {