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 TTY mode columns are padded to align and the last column is truncated to respect maxWidth; in non-TTY mode fields are tab-separated and headers are omitted.
Click to show internal directories.
Click to hide internal directories.