Documentation ¶
Overview ¶
Package ui helps get user input from the terminal, and formats output.
Index ¶
- Variables
- func Accept(question string) bool
- func Blue(in string) string
- func BlueBold(in string) string
- func BlueBoldUnderlined(in string) string
- func BlueDark(in string) string
- func BlueUnderlined(in string) string
- func Edit(oldValue string) (string, error)
- func GetInput(in *os.File) (string, error)
- func Green(in string) string
- func GreenBold(in string) string
- func GreenUnderlined(in string) string
- func Header(msg string, args ...interface{})
- func Red(in string) string
- func RedBold(in string) string
- func RedUnderlined(in string) string
- func RemoveColor(str string) string
- func SelectAmongOptions(title, usage string, options []string, optionTags map[string]string) (string, error)
- func SelectAmongStrictOptions(title, usage string, options []string, optionTags map[string]string) (string, error)
- func SelectAmongValues(title, usage string, options []string, optionTags map[string]string) (string, error)
- func SelectLongOptionalValue(title, usage string, options []string) (string, error)
- func SelectLongValue(title, usage string, options []string) (string, error)
- func SelectOptionalValue(title, usage string, options []string) (string, error)
- func SelectValue(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 Title(msg string, args ...interface{})
- func Usage(msg string, args ...interface{})
- func UserChoice(msg string, args ...interface{})
- func Warning(in string) string
- func Yellow(in string) string
- func YellowBold(in string) string
- func YellowUnderlined(in string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorSkipped = errors.New("skipped choice")
)
Functions ¶
func BlueBoldUnderlined ¶ added in v0.13.0
BlueBold outputs a string in blue bold.
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 SelectAmongOptions ¶ added in v0.13.0
func SelectAmongStrictOptions ¶ added in v0.39.1
func SelectAmongValues ¶ added in v0.13.0
func SelectLongOptionalValue ¶ added in v0.13.0
func SelectLongValue ¶ added in v0.13.0
func SelectOptionalValue ¶ added in v0.13.0
func SelectValue ¶ added in v0.13.0
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 YellowBold ¶ added in v0.13.0
YellowBold outputs a string in bold yellow.
func YellowUnderlined ¶
YellowUnderlined outputs a string in yellow, underlined.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.