Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputFile ¶
InputFile returns an io.Reader for the file pointed at by the --input flag. If the flag is not specified, it looks for a file named "input.txt" in the same package as the caller.
func Ints ¶
Ints returns an iter.Seq[int] over all lines in the provided io.Reader, converting each line to an int. This method panics if conversion of any line fails.
func Sections ¶
Sections returns an iter.Seq[string] over all blocks of lines in the provided io.Reader. Blocks are delimited by two newlines, and the resulting section has leading and trailing whitespace trimmed by strings.TrimSpace
func SectionsOf ¶
SectionsOf returns sections of input from the provided io.Reader delimited by the provided string, exclusive. The header up to the first delimiter is returned as the first element in the sequence. Empty sections are omitted.
Types ¶
This section is empty.