events: use os.SEEK_END instead of its value

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2019-03-13 11:51:59 +01:00
parent 39859850ae
commit 549e81ff3b

View File

@ -1,6 +1,8 @@
package libpod
import (
"os"
"github.com/containers/libpod/libpod/events"
"github.com/hpcloud/tail"
"github.com/pkg/errors"
@ -85,7 +87,7 @@ func (r *Runtime) Events(fromStart, stream bool, options []events.EventFilter, e
func (r *Runtime) getTail(fromStart, stream bool) (*tail.Tail, error) {
reopen := true
seek := tail.SeekInfo{Offset: 0, Whence: 2}
seek := tail.SeekInfo{Offset: 0, Whence: os.SEEK_END}
if fromStart || !stream {
seek.Whence = 0
reopen = false