Documentation ¶ Index ¶ func New(fieldName string, defval interface{}) func() interface{} type Chain type Interface func Func(defval interface{}) Interface Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(fieldName string, defval interface{}) func() interface{} New returns a prompt closure when executed asks for user input once and caches it for further invocations and has a default value that returns result. Types ¶ type Chain ¶ type Chain struct { Prompts []Interface } type Interface ¶ type Interface interface { // PromptMessage returns a proper prompt message for the given field with the given default value. PromptMessage(string) string EvaluateChoice(string) (interface{}, error) } func Func ¶ func Func(defval interface{}) Interface TODO add deep pretty printer TODO handle TOML Source Files ¶ View all Source files prompt.go Click to show internal directories. Click to hide internal directories.