Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNewTabWriter ¶
GetNewTabWriter returns a tabwriter that translates tabbed columns in input into properly aligned text.
func WriteTable ¶
func WriteTable(columns []string, obj []map[string]interface{}, output io.Writer, options *TableOptions) error
WriteTable prints a table to the provided output
Types ¶
type TableOptions ¶
type TableOptions struct { ColumnLabels *[]string ShowHeaders bool SortBy *string // If the AbsoluteTimestamps bool // The row of the Table that is active ActiveRow int }
TableOptions provides default flags necessary for printing. Given the following flag values, a printer can be requested that knows how to handle printing based on these values.
func NewTableOptions ¶
func NewTableOptions() *TableOptions
NewTableOptions returns options associated with human-readable printing, with default values set.
Click to show internal directories.
Click to hide internal directories.