Codebase list golang-github-vbauerster-mpb / 5dadd67
minor: refactoring godoc Vladimir Bauer 3 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
8383 return bar
8484 }
8585
86 // ProxyReader wraps r with metrics required for progress tracking.
87 // If r is 'unknown total/size' reader it's mandatory to call
88 // (*Bar).SetTotal(-1, true) method after (Reader).Read returns io.EOF.
89 // Panics if r is nil. If bar is already completed or aborted, returns
90 // nil.
86 // ProxyReader wraps io.Reader with metrics required for progress tracking.
87 // If `r` is 'unknown total/size' reader it's mandatory to call
88 // (*Bar).SetTotal(-1, true) method after (io.Reader).Read returns io.EOF.
89 // If bar is already completed or aborted, returns nil.
90 // Panics if `r` is nil.
9191 func (b *Bar) ProxyReader(r io.Reader) io.ReadCloser {
9292 if r == nil {
9393 panic("expected non nil io.Reader")