Use io.SeekStart/End/Current constants now for go1.7+ #2154
This commit is contained in:
parent
80588a5a6b
commit
e5be471ce0
24 changed files with 64 additions and 63 deletions
3
backend/cache/object.go
vendored
3
backend/cache/object.go
vendored
|
@ -4,7 +4,6 @@ package cache
|
|||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -223,7 +222,7 @@ func (o *Object) Open(options ...fs.OpenOption) (io.ReadCloser, error) {
|
|||
case *fs.RangeOption:
|
||||
offset, limit = x.Decode(o.Size())
|
||||
}
|
||||
_, err = cacheReader.Seek(offset, os.SEEK_SET)
|
||||
_, err = cacheReader.Seek(offset, io.SeekStart)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue