You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: scanner.go
    path of file: ./repos/goutil/strutil/textscan
    
    the code of the file until where you have to start completion: // Package textscan Implemented a parser that quickly scans and analyzes text content.
// It can be used to parse INI, Properties and other formats
package textscan

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"strings"
)

// ErrScan error on scan or parse contents
type ErrScan struct {
	Msg  string // error message
	Line int    // error line number, start 1
	Text string // text contents on error
}

// Error string
func (e ErrScan) Error() string {
	return fmt.Sprintf("%s. line %d: %q", e.Msg, e.Line, e.Text)
}

// Matcher interface
type Matcher interface {
	// Match
    
func (s *TextScanner) matchToken(text string) (ok bool) {
	for _, m := range s.matchers {
		s.prevTok = s.tok
		tok, err := m.Match(text, s.prevTok)
		if err != nil {
			s.err = ErrScan{Msg: err.Error(), Line: s.line, Text: text}
			return false
		}

		if tok != nil {
			if tok.HasMore() {
				if err := tok.ScanMore(s); err != nil {
					s.err = ErrScan{Msg: err.Error(), Line: s.line, Text: text}
					return false
				}
			}

			s.tok = tok
			return true
		}
	}

	// emtpy line, match next valid token
	if strings.TrimSpace(text) == "" {
		ok, text := s.ScanNext()
		if ok {
			return s.matchToken(text)
		}
		return false // end EOF
	}

	s.err = ErrScan{Msg: "invalid syntax, no matcher available", Line: s.line, Text: text}
	return false
}