Documentation
¶
Overview ¶
Package table formats data into a text-based table for human consumption.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyPrint ¶
PrettyPrint writes 't' as a nicely formatted table to the supplied Writer.
if HeaderRow / FooterRow options are specified then a divider will be added between the header and/or footer rows. Cells are allowed to be multi-line, use \n as a line break. If no Justify option is used, the default is to left justify.
Types ¶
type Options ¶
type Options int
Options represents different ways to control how the table is generated
const ( // HeaderRow if specified will format the first row in the table // as a header (i.e. there is a separator between it and the next row) HeaderRow Options = 1 << iota // as a footer (i.e. there is a separator between it and the previous row) FooterRow // SkipEmpty if specified will cause nothing to be generated in the case // that the table has no data (i.e. no rows besides the header & footer rows // if they are enabled) SkipEmpty // RightJustify indicates that cells should have their contents right // justified (left padded), rather than the default of left justified. RightJustify )