1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Use io.SeekStart/End/Current constants now for go1.7+ #2154

This commit is contained in:
Nick Craig-Wood
2018-04-06 19:53:06 +01:00
parent 80588a5a6b
commit e5be471ce0
24 changed files with 64 additions and 63 deletions

View File

@@ -159,7 +159,7 @@ func (rx *resumableUpload) transferStatus() (start int64, err error) {
// Transfer a chunk - caller must call googleapi.CloseBody(res) if err == nil || res != nil
func (rx *resumableUpload) transferChunk(start int64, chunk io.ReadSeeker, chunkSize int64) (int, error) {
_, _ = chunk.Seek(0, 0)
_, _ = chunk.Seek(0, io.SeekStart)
req := rx.makeRequest(start, chunk, chunkSize)
res, err := rx.f.client.Do(req)
if err != nil {