Documentation ¶
Index ¶
- Constants
- Variables
- func GetAlignment(align int) (label string)
- type Cell
- type Row
- type Table
- func (tbl *Table) AddCells(color func(a ...any) string, cells ...Cell) (err error)
- func (tbl *Table) AddRow(color func(a ...any) string, cells ...string) (err error)
- func (tbl *Table) Align(colName string, alignment int, includeHeader bool)
- func (tbl *Table) CalcWidth(column string, pad bool, verbose bool) (calcWidth int, debug debugCol)
- func (tbl *Table) CharWidth(column string) int
- func (tbl *Table) ColumnCount() int
- func (tbl *Table) FillWidths()
- func (tbl *Table) GetBorder(border int) (bool, bool)
- func (tbl *Table) Padding(before bool, colIndex int) int
- func (tbl *Table) Print()
- func (tbl *Table) SetBorder(border int, display bool, style bool)
- type WidthFunc
Constants ¶
View Source
const ( Left = 1 << iota Center Right Top Header Bottom Horizontal Left2 Center2 Right2 Top2 Header2 Bottom2 Horizontal2 )
Variables ¶
View Source
var ( // DefaultPadding specifies the number of spaces around content in columns. DefaultPadding = 1 // DefaultWriter specifies the output io.Writer for the Table.Print method. DefaultWriter io.Writer = os.Stdout // DefaultWidthFunc specifies the default WidthFunc for calculating column widths DefaultWidthFunc WidthFunc = utf8.RuneCountInString )
Functions ¶
func GetAlignment ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.