Skip to content

Commit

Permalink
Use io.SeekStart instead of deprecated os.SEEK_SET (#1701)
Browse files Browse the repository at this point in the history
`os.SEEK_SET` has been deprecated since Go 1.7.
Ref: https://pkg.go.dev/os#pkg-constants
  • Loading branch information
y-yagi authored Oct 24, 2021
1 parent 74993fa commit b3a5471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/fs/fs_real.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package fs

import (
"fmt"
"io"
"io/ioutil"
"os"
"sort"
Expand Down Expand Up @@ -224,7 +225,7 @@ func (f *realOpenedFile) Read(start int, end int) ([]byte, error) {
bytes := make([]byte, end-start)
remaining := bytes

_, err := f.handle.Seek(int64(start), os.SEEK_SET)
_, err := f.handle.Seek(int64(start), io.SeekStart)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b3a5471

Please sign in to comment.