Documentation ¶
Index ¶
- type DefaultParser
- func (p *DefaultParser) CSVHeader(regexps []*regexp.Regexp) []string
- func (p *DefaultParser) CompileRegex(fields []string) ([]*regexp.Regexp, error)
- func (p *DefaultParser) NamedGroup(field string) string
- func (p *DefaultParser) Parse(fields []string, b []byte) (*bytes.Buffer, error)
- func (p *DefaultParser) Save(buf *bytes.Buffer, filename string) error
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultParser ¶
type DefaultParser struct { }
func (*DefaultParser) CSVHeader ¶
func (p *DefaultParser) CSVHeader(regexps []*regexp.Regexp) []string
CSVHeader builds a slice out of named groups within a list of regexes.
func (*DefaultParser) CompileRegex ¶
func (p *DefaultParser) CompileRegex(fields []string) ([]*regexp.Regexp, error)
CompileRegex compiles regexes based on field names which may include a colon.
func (*DefaultParser) NamedGroup ¶
func (p *DefaultParser) NamedGroup(field string) string
NamedGroup converts a field into a name that can be used in a named group.
Click to show internal directories.
Click to hide internal directories.