Documentation
¶
Overview ¶
Package scanner provides an interface{} for scanning through a stream of bytes. The interface is compatible with bufio.Scanner.
Examples:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scanner ¶
type Scanner interface { Buffer(buf []byte, max int) // sets the initial buffer Scan() bool // advanced the scanner to the next block Bytes() []byte // returns the bytes of the current block Text() string // returns the text of the current block }
Scanner is an interface compatible with bufio.Scanner that is used by iterators. By using this interface, we can support streams separated by null bytes, new-line characters, or any separator.
Click to show internal directories.
Click to hide internal directories.