Documentation
¶
Overview ¶
Package table outputs data in a table format. The package is heavily inspired by github.com/gosuri/uitable.
Package table outputs data in a table format. The package is heavily inspired by github.com/gosuri/uitable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarkdownTable ¶
type MarkdownTable struct {
// contains filtered or unexported fields
}
MarkdownTable represents a decorator that renders the data in formatted in a table.
func (*MarkdownTable) AddRow ¶
func (t *MarkdownTable) AddRow(data ...interface{}) *MarkdownTable
AddRow adds a new row to the table.
func (*MarkdownTable) String ¶
func (t *MarkdownTable) String() string
String returns the string value of table.
type Table ¶
type Table struct {
// LineLength is the maximum allowed length of a line in the Table
LineLength uint
// Wrap when set to true wraps the contents of the columns when the length exceeds the MaxColWidth
Wrap bool
// SeparatorSpaces is the number of spaces between columns
SeparatorSpaces uint
// HeaderFormatter is a function that formats the header of the table
HeaderFormatter func(input string) string
// FirstColumnFormatter is a function that formats the first column of the table
FirstColumnFormatter func(input string) string
// contains filtered or unexported fields
}
Table represents a decorator that renders the data in formatted in a table.
Click to show internal directories.
Click to hide internal directories.