1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #36323 from iporsut/remove-getOffsetToReader

Remove unused method from multireader package
This commit is contained in:
Brian Goff 2018-02-15 21:12:41 -05:00 committed by GitHub
commit 89ce4209bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,22 +138,6 @@ func (r *multiReadSeeker) getCurOffset() (int64, error) {
return totalSize, nil return totalSize, nil
} }
func (r *multiReadSeeker) getOffsetToReader(rdr io.ReadSeeker) (int64, error) {
var offset int64
for _, r := range r.readers {
if r == rdr {
break
}
size, err := getReadSeekerSize(rdr)
if err != nil {
return -1, err
}
offset += size
}
return offset, nil
}
func (r *multiReadSeeker) Read(b []byte) (int, error) { func (r *multiReadSeeker) Read(b []byte) (int, error) {
if r.pos == nil { if r.pos == nil {
// make sure all readers are at 0 // make sure all readers are at 0