Confirm asks for yes or no input
(message string, defaultValue bool)
| 95 | |
| 96 | // Confirm asks for yes or no input |
| 97 | func (u Pipe) Confirm(message string, defaultValue bool) (bool, error) { |
| 98 | _, _ = fmt.Fprint(u.stdout, message) |
| 99 | var answer string |
| 100 | _, _ = fmt.Fscanln(u.stdin, &answer) |
| 101 | return utils.StringToBool(answer), nil |
| 102 | } |
nothing calls this directly
no test coverage detected