Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OK success exit code OK = 0 // ERR error exit code ERR = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶ added in v1.1.2
type Base struct {
}
Base formatter
type List ¶
type List struct {
Base // use for internal
// Title list title name
Title string
// Items list items.
// allow:
// struct, []int, []string, []interface{}, map[string]string, map[string]interface{}
Items interface{}
// NewLine print "\n" at last
NewLine bool
// contains filtered or unexported fields
}
List definition
String len:
len("你好"), len("hello"), len("hello你好") -> 6 5 11
type ShownFace ¶ added in v1.1.2
type ShownFace interface {
// data to string
String() string
// print current message
Print()
// print current message
Println()
}
ShownFace shown
type Table ¶
type Table struct {
Base // use for internal
// Title for the table
Title string
// Cols the table head col data
Cols []string
// Rows table data rows
Rows []interface{}
// HasBorder show border line
HasBorder bool
// RowBorder show row border
RowBorder bool
// HeadBorder show head border
HeadBorder bool
// WrapBorder wrap border for table
WrapBorder bool
}
Table a cli Table show
Click to show internal directories.
Click to hide internal directories.