Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeekLastLines ¶
func SeekLastLines(readSeeker io.ReadSeeker, lines uint, filter TailerFilterFunc) error
SeekLastLines sets the read position of the ReadSeeker to the wanted number of filtered lines before the end.
Types ¶
type Tailer ¶
type Tailer struct {
// contains filtered or unexported fields
}
Tailer reads an input line by line an tails them into the passed Writer. The lines have to be terminated with a newline.
func NewTailer ¶
func NewTailer(readSeeker io.ReadSeeker, writer io.Writer, filter TailerFilterFunc) *Tailer
NewTailer starts a Tailer which reads strings from the passed ReadSeeker line by line. If a filter function is specified the read lines are filtered. The matching lines are written to the passed Writer.
type TailerFilterFunc ¶
TailerFilterFunc decides if a line shall be tailed (func is nil or returns true) of shall be omitted (func returns false).
Click to show internal directories.
Click to hide internal directories.