Documentation ¶
Overview ¶
Package ui helps get user input from the terminal, and formats output.
Index ¶
- func Accept(question string) bool
- func Blue(in string) string
- func BlueBold(in string) string
- func BlueUnderlined(in string) string
- func GetInput(in *os.File) (string, error)
- func Green(in string) string
- func GreenBold(in string) string
- func GreenUnderlined(in string) string
- func Red(in string) string
- func RedBold(in string) string
- func RedUnderlined(in string) string
- func RemoveColor(str string) string
- func SelectOption(title, usage string, options []string) (string, error)
- func SpinWhileThingsHappen(title string, f func() error) error
- func TabulateMap(input map[string]int, firstHeader string, secondHeader string) (table string)
- func TabulateRows(rows [][]string, headers ...string) (table string)
- func UserChoice(msg string, args ...interface{})
- func Warning(in string) string
- func Yellow(in string) string
- func YellowUnderlined(in string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlueUnderlined ¶ added in v0.10.0
BlueUnderlined outputs a string in blue, underlined.
func GreenUnderlined ¶ added in v0.10.0
GreenUnderlined outputs a string in green, underlined.
func RedUnderlined ¶ added in v0.10.0
RedUnderlined outputs a string in red, underlined.
func RemoveColor ¶ added in v0.7.1
func SelectOption ¶
SelectOption among several, or input a new one, and return user input.
func SpinWhileThingsHappen ¶
SpinWhileThingsHappen is a way to launch a function and display a spinner while it is being executed.
func TabulateMap ¶ added in v0.9.0
TabulateMap of map[string]int.
func TabulateRows ¶ added in v0.9.0
TabulateRows of map[string]int.
func YellowUnderlined ¶
YellowUnderlined outputs a string in yellow, underlined.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.