Skip to content

Commit 6ee536b

Browse files
committed
daemon: remove use of deprecated os.SEEK_END
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 0cc7ad0 commit 6ee536b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

daemon/logger/loggerutils/logfile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func NewLogFile(logPath string, capacity int64, maxFiles int, compress bool, mar
116116
return nil, err
117117
}
118118

119-
size, err := log.Seek(0, os.SEEK_END)
119+
size, err := log.Seek(0, io.SeekEnd)
120120
if err != nil {
121121
return nil, err
122122
}
@@ -472,7 +472,7 @@ func decompressfile(fileName, destFileName string, since time.Time) (*os.File, e
472472
func newSectionReader(f *os.File) (*io.SectionReader, error) {
473473
// seek to the end to get the size
474474
// we'll leave this at the end of the file since section reader does not advance the reader
475-
size, err := f.Seek(0, os.SEEK_END)
475+
size, err := f.Seek(0, io.SeekEnd)
476476
if err != nil {
477477
return nil, errors.Wrap(err, "error getting current file size")
478478
}

0 commit comments

Comments
 (0)