Documentation
¶
Overview ¶
Package accessibility provides accessible functions to capture user input.
Index ¶
- func PromptBool(out io.Writer, in io.Reader, prompt string, defaultValue bool) bool
- func PromptInt(out io.Writer, in io.Reader, prompt string, low, high int, defaultValue *int) int
- func PromptPassword(out io.Writer, in uintptr, prompt string, validator func(input string) error) (string, error)
- func PromptString(out io.Writer, in io.Reader, prompt string, defaultValue string, ...) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PromptBool ¶
PromptBool prompts a user for a boolean value.
Given invalid input (non-boolean), the user will continue to be reprompted until a valid input is given, ensuring that the return value is always valid.
func PromptInt ¶
PromptInt prompts a user for an integer between a certain range.
Given invalid input (non-integers, integers outside of the range), the user will continue to be reprompted until a valid input is given, ensuring that the return value is always valid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.