add NewLine helper to create a Line instance
This commit is contained in:
parent
f3593827b3
commit
c5b73d3485
5
tail.go
5
tail.go
|
@ -24,6 +24,11 @@ type Line struct {
|
||||||
Err error // Error from tail
|
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`
|
// SeekInfo represents arguments to `os.Seek`
|
||||||
type SeekInfo struct {
|
type SeekInfo struct {
|
||||||
Offset int64
|
Offset int64
|
||||||
|
|
Loading…
Reference in New Issue