Documentation ¶
Overview ¶
Package csvw implements writers for CSV.
Index ¶
- Constants
- func NewCommaRecordWriter(out io.Writer, pr *output.Printing) output.RecordWriter
- func NewPingWriter(out io.Writer, sep rune) output.PingWriter
- func NewTabRecordWriter(out io.Writer, pr *output.Printing) output.RecordWriter
- type RecordWriter
- func (w *RecordWriter) Close(context.Context) error
- func (w *RecordWriter) Flush(context.Context) error
- func (w *RecordWriter) Open(_ context.Context, recMeta record.Meta) error
- func (w *RecordWriter) SetComma(c rune)
- func (w *RecordWriter) WriteRecords(ctx context.Context, recs []record.Record) error
Constants ¶
View Source
const ( // Tab is the tab rune. Tab = '\t' // Comma is the comma rune. Comma = ',' )
Variables ¶
This section is empty.
Functions ¶
func NewCommaRecordWriter ¶ added in v0.36.0
NewCommaRecordWriter returns writer instance that uses csvw.Comma.
func NewPingWriter ¶
func NewPingWriter(out io.Writer, sep rune) output.PingWriter
NewPingWriter returns a new instance.
func NewTabRecordWriter ¶ added in v0.36.0
NewTabRecordWriter returns writer instance that uses csvw.Comma.
Types ¶
type RecordWriter ¶
type RecordWriter struct {
// contains filtered or unexported fields
}
RecordWriter implements output.RecordWriter.
func (*RecordWriter) Close ¶
func (w *RecordWriter) Close(context.Context) error
Close implements output.RecordWriter.
func (*RecordWriter) Flush ¶
func (w *RecordWriter) Flush(context.Context) error
Flush implements output.RecordWriter.
func (*RecordWriter) SetComma ¶ added in v0.36.0
func (w *RecordWriter) SetComma(c rune)
SetComma sets the CSV writer comma value.
func (*RecordWriter) WriteRecords ¶
WriteRecords implements output.RecordWriter.
Click to show internal directories.
Click to hide internal directories.