MCPcopy Index your code
hub / github.com/coder/coder / confirmWithDefault

Function confirmWithDefault

scripts/releaser/ui.go:42–49  ·  view source on GitHub ↗

confirmWithDefault asks a yes/no question with the specified default ("yes" or "no").

(inv *serpent.Invocation, msg, def string)

Source from the content-addressed store, hash-verified

40// confirmWithDefault asks a yes/no question with the specified
41// default ("yes" or "no").
42func 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}

Callers 3

runReleaseFunction · 0.85
promptAndUpdateDocsFunction · 0.85
mainFunction · 0.85

Calls 1

PromptFunction · 0.92

Tested by

no test coverage detected