bufioScanner
bufio.Scanner is a convenience type in Go’s standard library (package bufio) that provides a simple way to tokenize input read from an io.Reader. It repeatedly returns tokens, as defined by a split function, making it useful for line-by-line or word-by-word processing of streams such as files, standard input, or network data.
The typical usage pattern is to create a scanner with NewScanner, loop with Scan to advance tokens,
Split functions determine how data is tokenized. The package provides several built-in splitters, including ScanLines (default),
Buffer size and token length are important considerations. The scanner has a default token size limit of
Notes: Text returns a string that references the scanner’s internal buffer, which may be overwritten by the