Documentation ¶
Overview ¶
example:
1. NewTable().Header([]string{"h1", "h2"}).Data([][]string{{"d1", "d2"}, {"d3","d4"}}).Flush() >>> H1 H2 d1 d2 d3 d4
NewTable(WithVertical()).Header([]string{"h1", "h2"}).Data([][]string{{"d1", "d2"}, {"d3","d4"}}).Flush()
>>> H1 d1 d3 H2 d2 d4
- 指定输出 NewTable(WithWriter(os.Stderr))
// NOTE: 没有设置 WithVertical 时,标题行 全部都是大写 设置 WithVertical 时,标题列 为首字母大写
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDataHeaderLength = errors.New("len(header) != len(data[i])")
)
Functions ¶
This section is empty.
Types ¶
type OpOption ¶
type OpOption func(*tableOption)
func WithVertical ¶
func WithVertical() OpOption
func WithWriter ¶
Click to show internal directories.
Click to hide internal directories.