type scanner … func newScanner(r io.Reader) *scanner { … } func (s *scanner) Scan() bool { … } // Unscan stops the scanner from advancing its position // for the next Scan. // // Bytes and Text will return the same token after next Scan // that they do right now. func (s *scanner) Unscan() { … }