Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidN = errors.New("cannot tail history with n <= 0") ErrEmptyFile = errors.New("cannot tail an empty file") )
Functions ¶
func Tail ¶
func Tail(filename string, n int64) (io.ReadCloser, error)
Tail returns a Reader that starts reading from the nth line from the end of the file. * If n < 0, Tail returns an error * If n >= 0, Tail returns a Reader that starts reading from the beginning of the last nth line. NOTE: It is the caller's responsibility to close the Reader when finished.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.