Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ask ¶
Ask formats and prints a prompt (which should be a yes or no question) on stdout, and then waits for a line of input from stdin. The string " y/N: " is automatically appended to the prompt. After trimming whitespace and converting to lowercase, if the response is "y" or "yes", the function returns true. An error may occur reading stdin.
func Prompt ¶
Prompt formats a prompt, prints it on stdout, and then waits for a line of input from stdin. The trailing CRLF or LF is not returned. If the response ends with an EOF, the characters read up to EOF are returned with the EOF error. Prompt uses unbuffered input to avoid consuming bytes intended for subsequent consumers of stdin.
Types ¶
This section is empty.