Documentation
¶
Overview ¶
Package format renders query results as CSV, TSV, or JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
Write renders the result in the given format. Rows arrive as maps keyed by column name, so CSV/TSV column order is taken from result.Columns.
func WriteObject ¶
WriteObject renders one value as JSON, for output that is a single record rather than the row set Write renders — the saved query `rdsh query show` reads. Both go through here so that every JSON stream rdsh prints comes from one encoder: the standard HTML escaping is then a decision made once rather than a coincidence between two call sites.
Types ¶
Click to show internal directories.
Click to hide internal directories.