Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteTable ¶
func WriteTable(w io.Writer, table Table, style TableStyler)
WriteTable formats table to writer with specified style
Types ¶
type ColorWriter ¶
ColorWriter
type DefaultStyle ¶
type DefaultStyle struct{}
DefaultStyle ...
func (DefaultStyle) BorderRender ¶
func (style DefaultStyle) BorderRender(border string, w *ColorWriter)
func (DefaultStyle) CellRender ¶
func (style DefaultStyle) CellRender(row, col int, cell string, w *ColorWriter)
type StringMatrix ¶
type StringMatrix [][]string
2-Array string
func (StringMatrix) ColCount ¶
func (m StringMatrix) ColCount() int
func (StringMatrix) Get ¶
func (m StringMatrix) Get(i, j int) string
func (StringMatrix) RowCount ¶
func (m StringMatrix) RowCount() int
type TableStyler ¶
type TableStyler interface { CellRender(row, col int, cell string, w *ColorWriter) BorderRender(border string, w *ColorWriter) }
TableStyler represents s render style for Table
type TableView ¶
type TableView struct {
// contains filtered or unexported fields
}
TableView represents a view of table, it implements Table interface, too
type TableWithHeader ¶
type TableWithHeader struct {
// contains filtered or unexported fields
}
TableWithHeader add header for table
func (TableWithHeader) ColCount ¶
func (twh TableWithHeader) ColCount() int
func (TableWithHeader) Get ¶
func (twh TableWithHeader) Get(i, j int) string
func (TableWithHeader) RowCount ¶
func (twh TableWithHeader) RowCount() int
Click to show internal directories.
Click to hide internal directories.