VENDOR intensifies

This commit is contained in:
bel
2020-03-13 03:41:54 +00:00
parent 0d6be1e9d8
commit a1cea7d1cb
1427 changed files with 527540 additions and 1 deletions

22
vendor/github.com/ncw/rclone/lib/readers/limited.go generated vendored Executable file
View File

@@ -0,0 +1,22 @@
package readers
import "io"
// LimitedReadCloser adds io.Closer to io.LimitedReader. Create one with NewLimitedReadCloser
type LimitedReadCloser struct {
*io.LimitedReader
io.Closer
}
// NewLimitedReadCloser returns a LimitedReadCloser wrapping rc to
// limit it to reading limit bytes. If limit < 0 then it does not
// wrap rc, it just returns it.
func NewLimitedReadCloser(rc io.ReadCloser, limit int64) (lrc io.ReadCloser) {
if limit < 0 {
return rc
}
return &LimitedReadCloser{
LimitedReader: &io.LimitedReader{R: rc, N: limit},
Closer: rc,
}
}