From 6ee536b4a048bbb9aaa0a017eabecd83d8d2a69e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 25 Nov 2019 18:53:03 +0100 Subject: [PATCH] daemon: remove use of deprecated os.SEEK_END Signed-off-by: Sebastiaan van Stijn --- daemon/logger/loggerutils/logfile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/logger/loggerutils/logfile.go b/daemon/logger/loggerutils/logfile.go index 2f6e7381df..4048d18097 100644 --- a/daemon/logger/loggerutils/logfile.go +++ b/daemon/logger/loggerutils/logfile.go @@ -116,7 +116,7 @@ func NewLogFile(logPath string, capacity int64, maxFiles int, compress bool, mar return nil, err } - size, err := log.Seek(0, os.SEEK_END) + size, err := log.Seek(0, io.SeekEnd) if err != nil { return nil, err } @@ -472,7 +472,7 @@ func decompressfile(fileName, destFileName string, since time.Time) (*os.File, e func newSectionReader(f *os.File) (*io.SectionReader, error) { // seek to the end to get the size // we'll leave this at the end of the file since section reader does not advance the reader - size, err := f.Seek(0, os.SEEK_END) + size, err := f.Seek(0, io.SeekEnd) if err != nil { return nil, errors.Wrap(err, "error getting current file size") }