mirror of https://github.com/minio/minio.git
18 lines
229 B
Go
18 lines
229 B
Go
|
package pb
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
// It's proxy reader, implement io.Reader
|
||
|
type Reader struct {
|
||
|
io.Reader
|
||
|
bar *ProgressBar
|
||
|
}
|
||
|
|
||
|
func (r *Reader) Read(p []byte) (n int, err error) {
|
||
|
n, err = r.Reader.Read(p)
|
||
|
r.bar.Add(n)
|
||
|
return
|
||
|
}
|