Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONWriter ¶
type JSONWriter struct {
// contains filtered or unexported fields
}
JSONWriter JSON format writer
func NewJSONWriter ¶
func NewJSONWriter(w io.Writer, fields []string) *JSONWriter
NewJSONWriter generate json writer fields are key field
func (*JSONWriter) Flush ¶
func (w *JSONWriter) Flush()
func (*JSONWriter) Write ¶
func (w *JSONWriter) Write(records []string) error
Write writes a single JSON record to w one line. A record is a slice of strings with each string being one field. Writes are buffered, so Flush must eventually be called to ensure that the record is written to the underlying io.Writer.
func (*JSONWriter) WriteAll ¶
func (w *JSONWriter) WriteAll(records [][]string) error
WriteAll writes multiple json records to w using Write and then calls Flush, returning any error from the Flush.
type XMLWriter ¶
type XMLWriter struct {
// contains filtered or unexported fields
}
XMLWriter XML format writer
func NewXMLWriter ¶
NewXMLWriter generate xml writer fields are key field
Click to show internal directories.
Click to hide internal directories.