From dfd672bcb1389a8e34285135227ccc7a1c84724d Mon Sep 17 00:00:00 2001 From: Sioro-Neoku Date: Sun, 13 Jan 2019 15:27:32 +0100 Subject: [PATCH] Use io.SeekStart instead of the deprecated os.SEEK_SET --- fileEntry.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fileEntry.go b/fileEntry.go index c1e4a01..10f4130 100644 --- a/fileEntry.go +++ b/fileEntry.go @@ -2,7 +2,6 @@ package main import ( "io" - "os" "github.com/anacrolix/torrent" ) @@ -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,