MCPcopy
hub / github.com/cli/cli / prompterRun

Function prompterRun

pkg/cmd/preview/prompter/prompter.go:116–131  ·  view source on GitHub ↗
(opts *prompterOptions)

Source from the content-addressed store, hash-verified

114}
115
116func prompterRun(opts *prompterOptions) error {
117 editor, err := cmdutil.DetermineEditor(opts.Config)
118 if err != nil {
119 return err
120 }
121
122 p := prompter.New(editor, opts.IO)
123
124 for _, f := range opts.PromptsToRun {
125 if err := f(p, opts.IO); err != nil {
126 return err
127 }
128 }
129
130 return nil
131}
132
133func runSelect(p prompter.Prompter, io *iostreams.IOStreams) error {
134 fmt.Fprintln(io.Out, "Demonstrating Single Select")

Callers 1

NewCmdPrompterFunction · 0.85

Calls 2

DetermineEditorFunction · 0.92
NewFunction · 0.92

Tested by

no test coverage detected