Documentation
¶
Overview ¶
Package tabular parses delimited tabular text (CSV or TSV) into a header-plus-rows structure. It decodes UTF-8/UTF-16 byte-order marks and auto-detects whether the delimiter is a comma or a tab, so it handles output from tools like Sysinternals sigcheck as well as generic CSV/TSV files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Table ¶
type Table struct {
Header []string
// Rows holds one map per data row, keyed by header column. If the header
// contains duplicate column names, the last column wins.
Rows []map[string]string
}
Table is parsed tabular data: the header columns and one map per data row, keyed by header column.
func Parse ¶
Parse decodes delimited CSV/TSV text. It strips/decodes UTF-8 and UTF-16 byte-order marks and auto-detects whether the delimiter is a comma or a tab.
func (*Table) Column ¶
Column returns the values of the column whose header matches name case-insensitively (trimming surrounding whitespace), with empty and whitespace-only cells dropped, and whether such a column exists.
func (*Table) HasColumns ¶
HasColumns reports whether every named column is present in the header.