add NewLine helper to create a Line instance

This commit is contained in:
Sridhar Ratnakumar 2013-11-14 09:44:28 -08:00
parent f3593827b3
commit c5b73d3485
1 changed files with 5 additions and 0 deletions

View File

@ -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