Documentation
¶
Index ¶
- func Leading(data []byte) []byte
- func Nop(token []byte) []byte
- func ToLength(splitFunc bufio.SplitFunc, maxLength int) bufio.SplitFunc
- func ToLengthWithTruncate(splitFunc bufio.SplitFunc, maxLength int, skipping *bool) bufio.SplitFunc
- func Trailing(data []byte) []byte
- func Whitespace(data []byte) []byte
- func WithFunc(splitFunc bufio.SplitFunc, trimFunc Func) bufio.SplitFunc
- type Config
- type Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToLengthWithTruncate ¶ added in v0.149.0
ToLengthWithTruncate wraps a bufio.SplitFunc to truncate tokens that exceed maxLength. Unlike ToLength which splits oversized content into multiple tokens, this function returns only the truncated portion (up to maxLength) and advances past the entire original content, effectively dropping the remainder. The skipping parameter is a pointer to a bool that tracks whether we're currently skipping the remainder of an oversized entry. This allows the state to be persisted across multiple reader recreations (e.g., between poll cycles).
func Whitespace ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.