Documentation ¶
Overview ¶
Package tui contains a set of helper objects and functions for terminal based user interfaces.
Index ¶
- Variables
- func Blue(s string) string
- func Bold(s string) string
- func Dim(s string) string
- func Disable()
- func Effects() bool
- func Green(s string) string
- func HasEffect(s string) bool
- func Red(s string) string
- func Table(w io.Writer, columns []string, rows [][]string)
- func Wrap(e, s string) string
- func Yellow(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // effects BOLD = "\033[1m" DIM = "\033[2m" RESET = "\033[0m" // colors RED = "\033[31m" GREEN = "\033[32m" BLUE = "\033[34m" YELLOW = "\033[33m" // foreground colors FOREBLACK = "\033[30m" FOREWHITE = "\033[97m" // background colors BACKDARKGRAY = "\033[100m" BACKRED = "\033[41m" BACKGREEN = "\033[42m" BACKYELLOW = "\033[43m" BACKLIGHTBLUE = "\033[104m" )
Functions ¶
func Effects ¶
func Effects() bool
Effects returns true if colors and effects are supported on the current terminal.
func Table ¶
Table accepts a slice of column labels and a 2d slice of rows and prints on the writer an ASCII based datagrid of such data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.