Documentation
¶
Overview ¶
Package csvout writes tables as CSV (RFC 4180): a header row, then one row per item, quoted where a cell needs it.
Every cell is neutralised against CSV injection first. A spreadsheet reads a cell that starts with =, +, -, @, a tab or a carriage return as a formula, so a host alias or a file name chosen by someone else could run one when the export is opened. Such a cell is written with a leading apostrophe, which spreadsheets show as text and strip.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Table ¶
Table is a header and its rows.
func Parse ¶
Parse reads CSV text with a header row into a Table, so a file produced elsewhere (the Termius export) can be filtered the same way.
func (Table) Column ¶
Head returns t with at most n rows. Column is the index of the first column named one of names, or -1.
func (Table) Drop ¶
Drop returns t without the named columns. A name that is not a column is ignored, so a saved choice survives a column being renamed or removed.