Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Parsing ¶
type Parsing struct { Rows <-chan *Row // contains filtered or unexported fields }
Parsing provides access to the (possibly ongoing) outcome of parser.Parse(). Clients can read new rows as they are parsed from Rows. Err() can be called before or after parsing stopped, and will return the error that caused parsing to stop, if any.
func Parse ¶
func Parse(lp LineParser, src io.Reader) *Parsing
Parse reads src line by line, applies the LineParser to each, and writes the resulting rows to Parsing.Rows. An error from the LineParser stops reading (and writing). The error can be retrieved from Parsing.Err().
type XsvLineParser ¶
type XsvLineParser struct {
// contains filtered or unexported fields
}
func NewXsvLineParser ¶
func NewXsvLineParser(separator string, fieldsSeparator string) *XsvLineParser
func (*XsvLineParser) Parse ¶
func (p *XsvLineParser) Parse(line string) (*Row, error)
Click to show internal directories.
Click to hide internal directories.