Documentation
¶
Index ¶
- Constants
- func AlignCenter(s string, n int) string
- func AlignLeft(s string, n int) string
- func AlignRight(s string, n int) string
- func TableTest(w io.Writer, width int)
- type Align
- type Col
- type Table
- func (this *Table) AddCol(title string) *Col
- func (this *Table) AddRow(row int, Data *Col)
- func (this *Table) AddRowByIndex(row int, Data *Col)
- func (this *Table) CalColumnWidths() error
- func (this *Table) Fprint(w io.Writer)
- func (this Table) FprintHeader(w io.Writer)
- func (this *Table) FprintOrderDesc(w io.Writer)
Constants ¶
View Source
const ( TextLeft = Align(iota) TextRight TextCenter )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Table ¶
type Table struct { Header []*Col Rows [][]*Col // row 行 col 列 ColumnWidths []int ShowHeader bool // contains filtered or unexported fields }
func (*Table) AddRowByIndex ¶
顺序增加第row行的数据 指定index
func (*Table) CalColumnWidths ¶
func (Table) FprintHeader ¶
Click to show internal directories.
Click to hide internal directories.