Documentation ¶
Index ¶
- Constants
- func AlignmentCenter(str string, width uint16) string
- func AlignmentLeft(str string, width uint16) string
- func AlignmentRight(str string, width uint16) string
- type Alignment
- type Column
- type FormattedItemList
- type Getter
- type Table
- func (t *Table) AlignFormattedItem(formatted []string) ([]string, error)
- func (t *Table) FormatHeader(color string, sep string) string
- func (t *Table) FormatItem(item any) ([]string, error)
- func (t *Table) FormatItemBasic(item any, sep string) (string, error)
- func (t *Table) MergeRowsHorizontal(out io.Writer, items FormattedItemList, maxWidthArg int, sep string, ...)
- func (t *Table) MergeRowsVertical(out io.Writer, items FormattedItemList, maxWidthArg int, sep string, ...)
- func (t *Table) TableWidth(margin uint16) uint16
- func (t *Table) UpdateWidth(widthByColumn map[string]uint16)
- func (t *Table) Width(colName string) uint16
- type TableSpec
Constants ¶
View Source
const (
MAX_WIDTH = 65535 // 2^16 - 1
)
Variables ¶
This section is empty.
Functions ¶
func AlignmentCenter ¶
func AlignmentLeft ¶
func AlignmentRight ¶
Types ¶
type FormattedItemList ¶
type Table ¶
type Table struct { *TableSpec // contains filtered or unexported fields }
func (*Table) AlignFormattedItem ¶
func (*Table) FormatItemBasic ¶
FormatItemBasic formats item for non-tabular formats like json and csv using col.Getter.ValueString
func (*Table) MergeRowsHorizontal ¶
func (*Table) MergeRowsVertical ¶
func (*Table) TableWidth ¶
func (*Table) UpdateWidth ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.