Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
TablePrinter renders aligned tabular output.
func (*TablePrinter) AddField ¶
func (t *TablePrinter) AddField(s string)
func (*TablePrinter) AddHeader ¶
func (t *TablePrinter) AddHeader(fields ...string)
AddHeader sets column headers. In TTY mode they are printed before data rows; in non-TTY mode they are suppressed so piped output stays machine-readable.
func (*TablePrinter) EndRow ¶
func (t *TablePrinter) EndRow()
func (*TablePrinter) Render ¶
func (t *TablePrinter) Render() error
Render writes all rows in the appropriate format (aligned columns for TTY, tab-separated for pipes). The last column is truncated to maxWidth in TTY mode.
Click to show internal directories.
Click to hide internal directories.