accessibility

package
v0.0.0-...-ef9ddd6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptBool

func PromptBool() bool

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

func PromptInt(prompt string, min, max int) int

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.

func PromptString

func PromptString(prompt string, validator func(input string) error) string

PromptString prompts a user for a string value and validates it against a validator function. It re-prompts the user until a valid input is given.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL