Function
promptBool
(opts *CreateOptions, value *bool, defaultValue bool, message string, help string)
Source from the content-addressed store, hash-verified
| 191 | } |
| 192 | |
| 193 | func promptBool(opts *CreateOptions, value *bool, defaultValue bool, message string, help string) (bool, error) { |
| 194 | if *value != defaultValue { |
| 195 | return *value, nil |
| 196 | } |
| 197 | err := opts.Ask(&survey.Confirm{ |
| 198 | Message: message, |
| 199 | Help: help, |
| 200 | Default: defaultValue, |
| 201 | }, value) |
| 202 | return *value, err |
| 203 | } |
Tested by
no test coverage detected