Versions in this module Expand all Collapse all v0 v0.2.3 May 4, 2026 v0.2.2 May 1, 2026 v0.2.1 Apr 28, 2026 v0.2.0 Apr 25, 2026 v0.1.0 Apr 25, 2026 Changes in this version + const BorderAll + const BorderBody + const BorderBottom + const BorderDefault + const BorderHeader + const BorderLeft + const BorderNone + const BorderRight + const BorderRows + const BorderTop + var BorderStyleDefault = BorderStyle + var StyleBold = Style + var StyleBoldBorder = Style + var StyleDouble = Style + var StyleMarkdown = Style + var StyleMinimal = Style + var StyleMySql = Style + var StyleRounded = Style + var StyleSimple = Style + type BorderStyle struct + Bottom rune + BottomIntersect rune + BottomLeft rune + BottomRight rune + Cell rune + Center rune + Left rune + Right rune + Top rune + TopIntersect rune + TopLeft rune + TopRight rune + type Cell struct + Align strutil.PosFlag + Val any + Width int + Wrap OverflowFlag + func NewCell(val any) *Cell + func (c *Cell) Init(opts *Options) + func (c *Cell) String() string + type DividerStyle struct + Intersect rune + Left rune + Right rune + type OptionFunc func(opts *Options) + func WithBorderFlags(flags uint8) OptionFunc + func WithCSVOutput(csv bool) OptionFunc + func WithCellPadding(padding string) OptionFunc + func WithColMaxWidth(width int) OptionFunc + func WithColumnWidths(widths ...int) OptionFunc + func WithOverflowFlag(flag OverflowFlag) OptionFunc + func WithShowRowNumber(show bool) OptionFunc + func WithSortColumn(col int, ascending bool) OptionFunc + func WithStyle(style Style) OptionFunc + func WithTrimSpace(trim bool) OptionFunc + func WithoutBorder() OptionFunc + type Options struct + Alignment strutil.PosFlag + CSVOutput bool + CellPadding string + ColMaxWidth int + ColumnWidths []int + OverflowFlag OverflowFlag + ShowRowNumber bool + SortAscending bool + SortColumn int + StructTag string + TrimSpace bool + func NewOptions() *Options + func (opts *Options) HasBorderFlag(flag uint8) bool + type OverflowFlag uint8 + const OverflowAuto + const OverflowCut + const OverflowWrap + type Row struct + Cells []*Cell + Height int + func (r *Row) Init(opts *Options) + type Style struct + Border BorderStyle + BorderFlags uint8 + Divider DividerStyle + FirstColor string + HeadColor string + RowColor string + TitleColor string + type Table struct + Heads []*Cell + Rows []*Row + Title string + func New(title string, fns ...OptionFunc) *Table + func (t *Table) AddHead(name string) *Table + func (t *Table) AddRow(cols ...any) *Table + func (t *Table) ConfigStyle(fn func(s *Style)) *Table + func (t *Table) Format() + func (t *Table) PrependHead(name string) *Table + func (t *Table) Render() string + func (t *Table) SetHeads(names ...string) *Table + func (t *Table) SetRows(rs any) *Table + func (t *Table) WithOptions(fns ...OptionFunc) *Table + func (t *Table) WithStyle(style Style) *Table