Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadOptionError ¶
type BadOptionError struct {
// contains filtered or unexported fields
}
BadOptionError indicates, well, bad options, are given.
func (BadOptionError) Error ¶
func (e BadOptionError) Error() string
Error implements the error interface
type Cell ¶
type Cell struct { // Content is the content of the cell. It can be either a SingleCell or a // MultiCell Content cellContent // Alignment specifies how the content of a cell should align Alignment Alignment // Frame defines a "frame" around the content. The array defines two strings, // which are added before and after the content, before any paddings are // inserted. Frame [2]string }
Cell defines a cell (column) in a row
type ColumnConstraint ¶
type ColumnConstraint int
ColumnConstraint specifies how a column should behave while being rendered. Use positive to specify a maximum width for the column, or one of const values for expandable width.
const ( // Expandable is a special ColumnConstraint where the column and may expand // automatically if other columns end up taking less actual width. Expandable ColumnConstraint = 0 // ExpandableWrappable is a special ColumnConstraint where the column is // expandable. In addition, it can wrap into multiple lines if needed. ExpandableWrappable ColumnConstraint = -1 )
type InconsistentRowsError ¶
type InconsistentRowsError struct {
// contains filtered or unexported fields
}
InconsistentRowsError is an error that is returned when number of columns are inconsistent across rows.
func (InconsistentRowsError) Error ¶
func (e InconsistentRowsError) Error() string
Error implements the error interface
type MultiCell ¶
type MultiCell struct { // Sep is the separator between different items Sep string // Items are the content Items []string }
MultiCell defines cell content with multiple strings. If being truncated, it looks like this: "item1,item2,+4..."
type SingleCell ¶
type SingleCell struct { // Item is, well, the contnet. Item string }
SingleCell defines cell content with a single string. If being truncated, the truncated part is replaced with "..."
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table defines a table and is used to do the rendering
func (*Table) NumInserts ¶ added in v1.0.19
type WidthTooSmallError ¶
type WidthTooSmallError struct{}
WidthTooSmallError indicates the width constraints is too small.
func (WidthTooSmallError) Error ¶
func (e WidthTooSmallError) Error() string
Error implements the error interface