Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ErrTSV marks a TSV parse failure. ErrTSV errs.Const = "tsv" // ErrJSON marks a JSON encoding failure. ErrJSON errs.Const = "json" )
The package's error vocabulary: errs.Const sentinels matched with errors.Is.
View Source
const ( FromTSVWithHeader fromTSVNoHeader = false FromTSVWithoutHeader fromTSVNoHeader = true FromTSVNoTrim fromTSVTrimSpaces = false FromTSVTrim fromTSVTrimSpaces = true )
Variables ¶
This section is empty.
Functions ¶
func FromTsv ¶
FromTsv returns a command that converts TSV (tab-separated) input into newline-delimited JSON: each row becomes one compact JSON object keyed by the column headers.
Flags:
- FromTSVWithoutHeader: treat every row as data and synthesize col1, col2…
- FromTSVTrim: trim leading whitespace in each field
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.