Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Table ¶
type Table struct { // A slice of ints defining the padding for each column Padding []int RenderedPadding string // Slice of strings representing column headers Header []string RenderedHeader string // Truncate rows if they exceed padding length Truncate bool // An array of row structs Rows []Row // RowSelectionPrompt puts a number in front of each row and prompts user for selection GetUserInput bool // A message to print after table has been printed SuccessMsg string // Optional message to print if no rows were passed to table NoResultsMsg string // Len 2 array with elements representing ColorCode and ColorTrm respectively ColorRowCode [2]string DynamicPadding bool // contains filtered or unexported fields }
Table represents a table to be printed
func (*Table) GetPadding ¶
GetPadding converts an array of ints into template padding for str fmting
Click to show internal directories.
Click to hide internal directories.