Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
Format writes rows to w in the requested format. Supported formats: tsv, csv, json, table.
func InferColumns ¶
InferColumns collects all keys from rows, sorts them alphabetically, and puts sample_accession first if present.
func InferFormatFromPath ¶ added in v0.15.0
InferFormatFromPath returns "tsv", "csv", "json", or "" based on the file extension (after stripping a trailing .gz). Returns "" when the extension is missing or unrecognised so callers can fall through to their own defaults.
Exposed as a separate step (rather than baked into ResolveFormat) so each command can interleave it with config-driven defaults in the correct priority: --format flag > filename hint > configured default > TTY default.
func IsTerminal ¶
func IsTerminal() bool
func OpenWriter ¶ added in v0.15.0
OpenWriter creates the file at path and returns a writer plus a close function. When path ends with .gz (case-insensitive) the returned writer is a gzip.Writer wrapping the file; the close function flushes the gzip stream and closes the underlying file. Callers must invoke close to avoid silently truncating the gzip trailer.