Documentation ¶
Overview ¶
Package scan accepts a bufio.SplitFunc and generalizes batches to non-line oriented input, e.g. XML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNestedTagsWithSameNameNotImplemented = errors.New("nested tags not implemented")
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct { BatchSize int SplitFunc bufio.SplitFunc NumWorkers int Verbose bool R io.Reader W io.Writer F func([]byte) ([]byte, error) }
Processor can process lines in parallel.
func NewProcessor ¶
NewProcessor creates a new line processor.
type TagSplitter ¶
type TagSplitter struct { BatchSize int // number of elements to collect in one batch // contains filtered or unexported fields }
TagSplitter splits a stream on a given XML element.
func NewTagSplitter ¶
func NewTagSplitter(tag string) *TagSplitter
NewTagSplitter returns a TagSplitter for a given XML element name, given as string.
Click to show internal directories.
Click to hide internal directories.