PromptInput prompts the user input and saves the result to the destination
(message string, dest *string)
| 40 | |
| 41 | // PromptInput prompts the user input and saves the result to the destination |
| 42 | func PromptInput(message string, dest *string) error { |
| 43 | log.Askf(message, false) |
| 44 | |
| 45 | input, err := readInput() |
| 46 | if err != nil { |
| 47 | return errors.Wrap(err, "getting user input") |
| 48 | } |
| 49 | |
| 50 | *dest = input |
| 51 | |
| 52 | return nil |
| 53 | } |
| 54 | |
| 55 | // PromptPassword prompts the user input a password and saves the result to the destination. |
| 56 | // The input is masked, meaning it is not echoed on the terminal. |
no test coverage detected