diff --git a/tail.go b/tail.go index 61a8cd2..b915300 100644 --- a/tail.go +++ b/tail.go @@ -24,6 +24,11 @@ type Line struct { Err error // Error from tail } +// NewLine returns a Line with present time. +func NewLine(text string) *Line { + return &Line{text, time.Now(), nil} +} + // SeekInfo represents arguments to `os.Seek` type SeekInfo struct { Offset int64