confirmWithDefault asks a yes/no question with the specified default ("yes" or "no").
(inv *serpent.Invocation, msg, def string)
| 40 | // confirmWithDefault asks a yes/no question with the specified |
| 41 | // default ("yes" or "no"). |
| 42 | func confirmWithDefault(inv *serpent.Invocation, msg, def string) error { |
| 43 | _, err := cliui.Prompt(inv, cliui.PromptOptions{ |
| 44 | Text: msg, |
| 45 | IsConfirm: true, |
| 46 | Default: def, |
| 47 | }) |
| 48 | return err |
| 49 | } |
no test coverage detected