Documentation ¶
Overview ¶
Package rawfmt defines encoding and decoding of the raw format.
Raw is similar to CSV, but uses \t for the default delimiter and offers no means of quoting values that contain the delimiter.
Unlike CSV, it defaults to not having a header.
It is primarily useful as it is the default format for many command line utilities.
Index ¶
- type Decoder
- func (d *Decoder) Close() error
- func (d *Decoder) Init(r device.Reader) error
- func (*Decoder) Name() string
- func (d *Decoder) ReadHeader(_ string, potentialHeader []string) ([]string, error)
- func (d *Decoder) ReadRow() ([]*string, error)
- func (d *Decoder) Reset() error
- func (d *Decoder) Skip(rows int) error
- type Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { Tab rune UseCRLF bool //True to use \r\n as the line terminator, otherwise \n. Null null.Encoding Strict bool //When true reports an error if there are more or less fields than required NoHeader bool //True if there is no header in the input // contains filtered or unexported fields }
Decoder decodes the raw format
func (*Decoder) ReadHeader ¶
ReadHeader decodes the header
type Encoder ¶
type Encoder struct { Tab rune //If undefined, defaults to \t UseCRLF bool //True to use \r\n as the line terminator, otherwise \n. Null null.Encoding NoHeader bool //If true, do not write header to output // contains filtered or unexported fields }
Encoder encodes the raw format
func (*Encoder) WriteHeader ¶
WriteHeader encodes the header.
Click to show internal directories.
Click to hide internal directories.