Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFieldFormat = errors.New("wrong LTSV field format") ErrLabelName = errors.New("unexpected label name") )
These are the errors that can be returned in ParseError.Error
Functions ¶
This section is empty.
Types ¶
type LTSVReader ¶
type LTSVReader struct {
// contains filtered or unexported fields
}
A Reader reads from a Labeled TSV (LTSV) file.
As returned by NewReader, a Reader expects input conforming LTSV (http://ltsv.org/)
func NewReader ¶
func NewReader(r io.Reader) *LTSVReader
NewReader returns a new LTSVReader that reads from r.
type LTSVWriter ¶
type LTSVWriter struct { UseCRLF bool // contains filtered or unexported fields }
A Writer wites records to a LTSV encoded file.
As returned by NewWriter, a Writer writes records terminated by a newline and uses '\t' as the field delimiter. Detailed format is described in LTSV official web site. (http://ltsv.org/)
func NewWriter ¶
func NewWriter(w io.Writer) *LTSVWriter
NewWriter returns a new Writer that writes to w.
func (*LTSVWriter) Flush ¶
func (w *LTSVWriter) Flush() (err error)
Flush writes bufferd data to the underlying bufio.Writer
Click to show internal directories.
Click to hide internal directories.