package conf import ( "fmt" "io" "os" ) // Having a Config to Manager function could be nice? // Or we could just return a Manager from here. type Config struct { } type parser struct { scanner } func NewConfig(r io.Reader) *Config { s := newScanner(r) tok, err := s.Scan() for err == nil { fmt.Fprintf(os.Stderr, "tokentype: %d, token: %q offset: %d, line: %d\n", tok.Type, tok.Lit, tok.Offset, tok.LineNr) tok, err = s.Scan() } fmt.Fprintf(os.Stderr, "Error: tokentype: %d, token: %q, err: %v\n", tok.Type, tok.Lit, err) return &Config{} }