tail

package
v0.9.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL