Exemple #1
0
func NewWriter(format string, version int) *Writer {
	return &Writer{
		format:       format,
		version:      version,
		ParseManager: parser.NewParseManager(),
	}
}
Exemple #2
0
func NewReader(r io.Reader) *Reader {
	ar := Reader{
		r:            r,
		ParseManager: parser.NewParseManager(),
		headerReader: &headerReader{},
	}
	// register generic parser so that basic parsing will always work
	p := &parser.GenericParser{}
	ar.SetGeneric(p)
	return &ar
}