示例#1
0
func NewWriter(format string, version int) *Writer {
	return &Writer{
		format:       format,
		version:      version,
		ParseManager: parser.NewParseManager(),
	}
}
示例#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
}