// NewCSVTransformer returns a new CSVTransformer wrapping the given io.Writer object func NewCSVTransformer() *CSVTransformer { return &CSVTransformer{ Parameters: util.CSVParameters{ Writer: util.NewCSVWriter(), WriteHeader: true, HeaderWritten: false, SendUpstream: true, }, } }
// NewCSVWriter returns a new CSVWriter wrapping the given io.Writer object func NewCSVWriter(w io.Writer) *CSVWriter { writer := util.NewCSVWriter() writer.SetWriter(w) return &CSVWriter{ Parameters: util.CSVParameters{ Writer: writer, WriteHeader: true, HeaderWritten: false, SendUpstream: false, }, } }