Documentation
¶
Index ¶
- Variables
- type CellOption
- type Table
- func (t *Table) Cell(value string, opts ...CellOption) *Table
- func (t *Table) Col(col int) *Table
- func (t *Table) CurCol() int
- func (t *Table) Format(w io.Writer) error
- func (t *Table) Row() *Table
- func (t *Table) SetShrink(col int, shrink bool)
- func (t *Table) Span(cols int, value string, opts ...CellOption) *Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Left CellOption = func(c *textCell) { c.alignment = alignLeft } Center = func(c *textCell) { c.alignment = alignCenter } Right = func(c *textCell) { c.alignment = alignRight } )
Functions ¶
This section is empty.
Types ¶
type CellOption ¶
type CellOption func(c *textCell)
func LeftMargin ¶
func LeftMargin(x string) CellOption
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table does layout of text-based tables.
Many of its methods return the textTable so callers can easily chain them to build up many cells at once.
func (*Table) Cell ¶
func (t *Table) Cell(value string, opts ...CellOption) *Table
Cell adds a single-column cell at the current row and column.
Click to show internal directories.
Click to hide internal directories.