Documentation ¶
Index ¶
- Variables
- func Close() error
- func Flush() error
- func ForEachByte(b []byte, do func(byte))
- func ForEachByteInString(s string, do func(byte))
- func ForEachRune(b []byte, do func(rune))
- func ForEachRuneInString(s string, do func(rune))
- func Init() (err error)
- func Print(args ...interface{}) (int, error)
- func Printf(format string, args ...interface{}) (int, error)
- func Println(args ...interface{}) (int, error)
- func ReadLine(prompt string) (line string, err error)
- func ReadPassowrd(prompt string) (line string, err error)
- func RenderCell(w io.Writer, cell string, width int, align CellAlign) (err error)
- func RenderCellCentered(w io.Writer, cell string, width int) (err error)
- func RenderCellLeftAlign(w io.Writer, cell string, width int) (err error)
- func RenderCellRightAlign(w io.Writer, cell string, width int) (err error)
- func RenderColumn(w io.Writer, col string, width int) (err error)
- func RenderTableView(w io.Writer, t TableView) (err error)
- func RenderTableViewColumns(w io.Writer, t TableView) (err error)
- func RenderTableViewRows(w io.Writer, t TableView) (err error)
- func RenderTreeView(w io.Writer, t TreeView) (err error)
- func RuneCount(b []byte) (n int)
- func RuneCountInString(s string) int
- func StripStyles(b []byte) []byte
- func StripStylesInString(s string) string
- type CellAlign
- type ReadWriter
- type Reader
- type StyleSet
- type Table
- type TableView
- type Tree
- type TreeIndent
- type TreeView
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Input Reader Output Writer )
Functions ¶
func ForEachByte ¶
func ForEachByteInString ¶
func ForEachRune ¶
func ForEachRuneInString ¶
func ReadPassowrd ¶
func RenderCellLeftAlign ¶
func RenderCellRightAlign ¶
func RuneCountInString ¶
func StripStyles ¶
func StripStylesInString ¶
Types ¶
type ReadWriter ¶
type StyleSet ¶
type StyleSet []int
var ( Normal StyleSet = StyleSet{0} Bold StyleSet = StyleSet{1} Dim StyleSet = StyleSet{2} Standout StyleSet = StyleSet{3} Underline StyleSet = StyleSet{4} Blink StyleSet = StyleSet{5} Reverse StyleSet = StyleSet{7} Hidden StyleSet = StyleSet{8} Black StyleSet = StyleSet{30} Red StyleSet = StyleSet{31} Green StyleSet = StyleSet{32} Yellow StyleSet = StyleSet{33} Blue StyleSet = StyleSet{34} Magenta StyleSet = StyleSet{35} Cyan StyleSet = StyleSet{36} White StyleSet = StyleSet{37} Default StyleSet = StyleSet{38} BlackBG StyleSet = StyleSet{40} RedBG StyleSet = StyleSet{41} GreenBG StyleSet = StyleSet{42} YellowBG StyleSet = StyleSet{43} BlueBG StyleSet = StyleSet{44} MagentaBG StyleSet = StyleSet{45} CyanBG StyleSet = StyleSet{46} WhiteBG StyleSet = StyleSet{47} DefaultBG StyleSet = StyleSet{48} )
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func NewTableFromView ¶
type TableView ¶
type TableView interface { Column(col int) string Cell(col int, row int) string Size() (cols int, rows int) }
func NewTableView ¶
func NewTableView(v interface{}) TableView
func StyledTableView ¶
type TreeIndent ¶
type TreeIndent struct {
// contains filtered or unexported fields
}
func NewTreeIndent ¶
func NewTreeIndent() *TreeIndent
func (*TreeIndent) Clear ¶
func (ti *TreeIndent) Clear(index int, depth int)
func (*TreeIndent) Depth ¶
func (ti *TreeIndent) Depth() int
func (*TreeIndent) Pop ¶
func (ti *TreeIndent) Pop()
func (*TreeIndent) Push ¶
func (ti *TreeIndent) Push() int
func (*TreeIndent) String ¶
func (ti *TreeIndent) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.