Skip to content

Commit

Permalink
Use io.SeekStart instead of the deprecated os.SEEK_SET
Browse files Browse the repository at this point in the history
  • Loading branch information
Sioro-Neoku committed Jan 13, 2019
1 parent ea98498 commit dfd672b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fileEntry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"io"
"os"

"github.com/anacrolix/torrent"
)
Expand Down Expand Up @@ -32,7 +31,7 @@ func NewFileReader(f *torrent.File) (SeekableContent, error) {
// We read ahead 1% of the file continuously.
reader.SetReadahead(f.Length() / 100)
reader.SetResponsive()
_, err := reader.Seek(f.Offset(), os.SEEK_SET)
_, err := reader.Seek(f.Offset(), io.SeekStart)

return &FileEntry{
File: f,
Expand Down

0 comments on commit dfd672b

Please sign in to comment.