diff --git a/bar.go b/bar.go index 92ef92c..ab56127 100644 --- a/bar.go +++ b/bar.go @@ -161,7 +161,7 @@ // ProxyReader wraps r with metrics required for progress tracking. func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser { if r == nil { - panic("expect io.Reader, got nil") + return nil } rc, ok := r.(io.ReadCloser) if !ok {