summaryrefslogtreecommitdiff
path: root/vendor/gopkg.in/cheggaaa/pb.v1/reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gopkg.in/cheggaaa/pb.v1/reader.go')
-rw-r--r--vendor/gopkg.in/cheggaaa/pb.v1/reader.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/vendor/gopkg.in/cheggaaa/pb.v1/reader.go b/vendor/gopkg.in/cheggaaa/pb.v1/reader.go
deleted file mode 100644
index 9f3148b54..000000000
--- a/vendor/gopkg.in/cheggaaa/pb.v1/reader.go
+++ /dev/null
@@ -1,25 +0,0 @@
-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
-}
-
-// Close the reader when it implements io.Closer
-func (r *Reader) Close() (err error) {
- if closer, ok := r.Reader.(io.Closer); ok {
- return closer.Close()
- }
- return
-}