Documentation ¶
Overview ¶
Line Scanner with minimized copying. We wish we'd do a circular buffer and readv() into it but that's not available in Go (outside of linux for some reason despite posix).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoEOL = errors.New("no EOL found within maximum line length")
Functions ¶
This section is empty.
Types ¶
type SlidingBuffer ¶
type SlidingBuffer struct {
// contains filtered or unexported fields
}
func LineScanner ¶
func LineScanner(f io.Reader, bufferSize, readSize, maxLineLength int) *SlidingBuffer
func (*SlidingBuffer) EOF ¶
func (sb *SlidingBuffer) EOF() bool
func (*SlidingBuffer) Line ¶
func (sb *SlidingBuffer) Line() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.