SkipPromptOption adds a "--yes/-y" flag to the cmd that can be used to skip confirmation prompts.
()
| 34 | // SkipPromptOption adds a "--yes/-y" flag to the cmd that can be used to skip |
| 35 | // confirmation prompts. |
| 36 | func SkipPromptOption() serpent.Option { |
| 37 | return serpent.Option{ |
| 38 | Flag: skipPromptFlag, |
| 39 | FlagShorthand: "y", |
| 40 | Description: "Bypass confirmation prompts.", |
| 41 | // Discard |
| 42 | Value: serpent.BoolOf(new(bool)), |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | const ( |
| 47 | ConfirmYes = "yes" |
no outgoing calls