Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEndOfTail error = errors.New("end of tail")
View Source
var ErrLineTooLong error = errors.New("a line doesnot fit in the buffer")
Functions ¶
This section is empty.
Types ¶
type Line ¶
type Line struct { // No is the number of current line, starting from 1 No int // LineStart is the start offset of current line in the File, in number of bytes, staring from 0 LineStart int64 // LineEnding is the ending offset of current line in the File, in number of bytes, staring from 0, pointing at current \n LineEnding int64 // Raw holds the line content, excluding \n Raw []byte }
type Scanner ¶ added in v0.2.0
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶ added in v0.2.0
func NewScanner(fd *os.File, buf []byte, opts ...ScannerOption) Scanner
func (*Scanner) ResumeFromEOF ¶ added in v0.2.0
type ScannerOption ¶ added in v0.2.0
type ScannerOption func(*Scanner)
func WithStartPos ¶ added in v0.2.0
func WithStartPos(startingByte int64, startingLine int) ScannerOption
Click to show internal directories.
Click to hide internal directories.