Documentation ¶
Index ¶
- Variables
- func Ask(message, provided string, defaultValue ...string) string
- func AskOrReturnToExit(message string, defaultValue ...string) string
- func GetValidatorFor(prop validation.Validatable) survey.Validator
- func HandleError(err error)
- func MultiSelect(message string, options []string, defaultValues []string) []string
- func OutputError(msg string)
- func OutputMessage(msg string)
- func OutputSelection(msg, choice string)
- func Proceed(message string) bool
- func Select(message string, options []string, defaultValue ...string) string
- func SelectFromOtherErrorMessage(msg, wrong string) string
- func SelectOrCheckExisting(parameterValue *string, capitalizedParameterName string, validValues []string, ...)
- type Displayable
- type DisplayableMap
- func (d *DisplayableMap) Add(displayable Displayable)
- func (d DisplayableMap) AsDisplayableOptions() []string
- func (d DisplayableMap) GetByIndex(i int) Displayable
- func (d DisplayableMap) GetByName(name string) (Displayable, bool)
- func (d DisplayableMap) Len() int
- func (d DisplayableMap) Less(i, j int) bool
- func (d DisplayableMap) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
View Source
var Empty = DisplayableMap{}
Functions ¶
func AskOrReturnToExit ¶
func GetValidatorFor ¶
func GetValidatorFor(prop validation.Validatable) survey.Validator
GetValidatorFor returns an implementation specific validator for the given validatable to avoid type casting at each calling site
func HandleError ¶
func HandleError(err error)
HandleError handles UI-related errors, in particular useful to gracefully handle ctrl-c interrupts gracefully
func MultiSelect ¶
func OutputError ¶ added in v0.1.11
func OutputError(msg string)
func OutputMessage ¶ added in v0.2.0
func OutputMessage(msg string)
func OutputSelection ¶
func OutputSelection(msg, choice string)
func SelectFromOtherErrorMessage ¶ added in v0.1.5
Types ¶
type Displayable ¶ added in v0.2.0
type Displayable interface { Help() string Display() string Name() string GetUnderlying() interface{} }
func SelectDisplayable ¶ added in v0.2.0
func SelectDisplayable(message string, options DisplayableMap, defaultValue ...string) Displayable
type DisplayableMap ¶ added in v0.2.0
type DisplayableMap struct {
// contains filtered or unexported fields
}
func NewDisplayableMap ¶ added in v0.2.0
func NewDisplayableMap(size int) DisplayableMap
func (*DisplayableMap) Add ¶ added in v0.2.0
func (d *DisplayableMap) Add(displayable Displayable)
func (DisplayableMap) AsDisplayableOptions ¶ added in v0.2.0
func (d DisplayableMap) AsDisplayableOptions() []string
func (DisplayableMap) GetByIndex ¶ added in v0.2.0
func (d DisplayableMap) GetByIndex(i int) Displayable
func (DisplayableMap) GetByName ¶ added in v0.2.0
func (d DisplayableMap) GetByName(name string) (Displayable, bool)
func (DisplayableMap) Len ¶ added in v0.2.0
func (d DisplayableMap) Len() int
func (DisplayableMap) Less ¶ added in v0.2.0
func (d DisplayableMap) Less(i, j int) bool
func (DisplayableMap) Swap ¶ added in v0.2.0
func (d DisplayableMap) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.