Documentation
¶
Index ¶
- func Choose(name, message string, required bool, optionsFn OptionsFunc) (string, error)
- func ChooseAndSet(cfg config.ConfigurationSet, name, message string, required bool, ...) error
- func Confirm(name, message string, required bool) (bool, error)
- func Input(name, message string, required bool) (string, error)
- func InputAndSet(cfg config.ConfigurationSet, name, message string, required bool) error
- func InputSensitiveAndSet(cfg config.ConfigurationSet, name, message string, required bool) error
- type OptionsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Choose ¶
func Choose(name, message string, required bool, optionsFn OptionsFunc) (string, error)
Choose will resolve a configuration item by asking the user to select a value from a list
func ChooseAndSet ¶
func ChooseAndSet(cfg config.ConfigurationSet, name, message string, required bool, optionsFn OptionsFunc) error
ChooseAndSet will resolve and set a configuration item by asking the user to select a value from a list
func InputAndSet ¶
func InputAndSet(cfg config.ConfigurationSet, name, message string, required bool) error
InputAndSet will resolve and set a configuration item by asking the user to enter a value
func InputSensitiveAndSet ¶
func InputSensitiveAndSet(cfg config.ConfigurationSet, name, message string, required bool) error
InputSensitiveAndSet will resolve and set a configuration item by asking the user to enter a value but it won't show the value eneterd
Types ¶
type OptionsFunc ¶
OptionsFunc is a function that will return the list of options to select from in the form if a map that is displayname:value
func OptionsFromConfigList ¶
func OptionsFromConfigList(listName string) OptionsFunc
OptionsFromConfigList will return an options func based on a list from the app config
func OptionsFromMap ¶
func OptionsFromMap(values map[string]string) OptionsFunc
OptionsFromMap will create a OptionsFunc from a map
func OptionsFromStringSlice ¶
func OptionsFromStringSlice(values []string) OptionsFunc
OptionsFromStringSlice will create a OptionsFunc from a slice of strings