Documentation ¶
Index ¶
- func AskForDateTime(name, value string, convert func(string) (time.Time, error)) (time.Time, error)
- func AskForDateTimeOrNil(name, value string, convert func(string) (time.Time, error)) (*time.Time, error)
- func AskForInt(message string, d int) (int, error)
- func AskForText(message, d string, opts ...InputOption) (string, error)
- func AskFromOptions(message string, options []string, d string) (string, error)
- func AskManyFromOptions(message string, options, d []string) ([]string, error)
- func Confirm(message string, d bool) (bool, error)
- func WithSuggestion(fn func(toComplete string) []string) func(*survey.Input)
- type InputOption
- type RGB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForDateTime ¶ added in v0.26.0
func AskForDateTime( name, value string, convert func(string) (time.Time, error), ) (time.Time, error)
AskForDateTime interactively ask for one date and time from the user
func AskForDateTimeOrNil ¶ added in v0.26.0
func AskForText ¶
func AskForText(message, d string, opts ...InputOption) (string, error)
AskForText interactively ask for one string from the user
func AskFromOptions ¶
AskFromOptions interactively ask the user to choose one option or none
func AskManyFromOptions ¶
AskManyFromOptions interactively ask the user to choose none or many option
func WithSuggestion ¶ added in v0.26.0
WithSuggestion applies the suggestion function to the input question
Types ¶
type InputOption ¶ added in v0.26.0
type InputOption func(*survey.Input)
InputOption represets a funcion the customizes a survey.Input object
Click to show internal directories.
Click to hide internal directories.