Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HelpInputRune = '?' ErrorIcon = "✘" HelpIcon = "ⓘ" QuestionIcon = "?" MarkedOptionIcon = "◉" UnmarkedOptionIcon = "◯" SelectFocusIcon = "❯" )
View Source
var DisableColor = false
View Source
var SimpleReadlineConfig = &readline.Config{ Stdout: ioutil.Discard, FuncMakeRaw: func() error { return nil }, FuncExitRaw: func() error { return nil }, HistoryLimit: -1, EOFPrompt: "\n", }
basic readline config that does not put terminal in Raw mode so that basic editing works (backspace, arrow keys etc). This is used by all text-input prompt types
View Source
var TemplateFuncs = map[string]interface{}{ "color": func(color string) string { if DisableColor { return "" } return ansi.ColorCode(color) }, "HelpInputRune": func() string { return string(HelpInputRune) }, "ErrorIcon": func() string { return ErrorIcon }, "HelpIcon": func() string { return HelpIcon }, "QuestionIcon": func() string { return QuestionIcon }, "MarkedOptionIcon": func() string { return MarkedOptionIcon }, "UnmarkedOptionIcon": func() string { return UnmarkedOptionIcon }, "SelectFocusIcon": func() string { return SelectFocusIcon }, }
Functions ¶
func RunTemplate ¶
func WriteAnswer ¶
Types ¶
Notes ¶
Bugs ¶
the current implementation might cause weird conflicts if there are two fields with same name that only differ by casing.
Click to show internal directories.
Click to hide internal directories.