Documentation
¶
Index ¶
- func Bool(prompt string) (result bool, err error)
- func Default[T any](prompt string, def T, pp console.ParsedPromptFunc[T]) (result T, err error)
- func Float(prompt string) (result float64, err error)
- func Int(prompt string) (result int, err error)
- func Password(prompt string) (result string, err error)
- func Question(q string, def string) (result string)
- func QuestionBool(q string, def bool) (result bool)
- func QuestionChoice(q string, def string, choices []string) (result string)
- func QuestionFloat(q string, def float64) (result float64)
- func QuestionInt(q string, def int) (result int)
- func QuestionUint(q string, def uint) (result uint)
- func Slice(prompt string, t ...scanner.Tokenizer) (result []string, err error)
- func SliceBool(prompt string, t ...scanner.Tokenizer) (result []bool, err error)
- func SliceFloat(prompt string, t ...scanner.Tokenizer) (result []float64, err error)
- func SliceInt(prompt string, t ...scanner.Tokenizer) (result []int, err error)
- func SliceUint(prompt string, t ...scanner.Tokenizer) (result []uint, err error)
- func String(prompt string) (result string, err error)
- func Uint(prompt string) (result uint, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
func Default[T any](prompt string, def T, pp console.ParsedPromptFunc[T]) (result T, err error)
Default lance une invite de commande attendant une réponse optionnelle
func Question ¶
Question invite à saisir une chaîne. Si aucune chaîne n’est saisie, def est retourné.
func QuestionBool ¶
QuestionBool invite à saisir un booléen. Si aucun booléen n’est saisi, def est retourné.
func QuestionChoice ¶
QuestionChoice invite à saisir un chaîne parmi un choix donné. Si aucun choix n’est effectué, retourne def.
func QuestionFloat ¶
QuestionFloat invite à saisir un nombre décimal. Si aucun nombre décimal n’est saisi, def est retourné.
func QuestionInt ¶
QuestionInt invite à saisir un entier. Si aucun entier n’est saisi, def est retourné.
func QuestionUint ¶
QuestionUint invite à saisir un entier non signé. Si aucun entier non signé n’est saisi, def est retourné.
func SliceFloat ¶
SliceFloat retourne les nombres décimaux saisis.
Types ¶
This section is empty.