Skip to content

Commit

Permalink
chore: os.SEEK_SET has been deprecated since Go 1.7, remove it (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Sep 25, 2024
1 parent bb8e894 commit 1a4993f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/torrent/storage/piecereader/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package piecereader
import (
"fmt"
"io"
"os"

"github.com/uber/kraken/lib/store"
)
Expand Down Expand Up @@ -53,7 +52,7 @@ func (r *FileReader) Read(p []byte) (int, error) {
if err != nil {
return 0, fmt.Errorf("open: %s", err)
}
if _, err := f.Seek(r.offset, os.SEEK_SET); err != nil {
if _, err := f.Seek(r.offset, io.SeekStart); err != nil {
return 0, fmt.Errorf("seek: %s", err)
}
r.reader = io.LimitReader(f, r.length)
Expand Down

0 comments on commit 1a4993f

Please sign in to comment.