MCPcopy Create free account
hub / github.com/cli/cli / runInput

Function runInput

pkg/cmd/preview/prompter/prompter.go:203–211  ·  view source on GitHub ↗
(p prompter.Prompter, io *iostreams.IOStreams)

Source from the content-addressed store, hash-verified

201}
202
203func runInput(p prompter.Prompter, io *iostreams.IOStreams) error {
204 fmt.Fprintln(io.Out, "Demonstrating Text Input")
205 text, err := p.Input("Favorite meal?", "Breakfast")
206 if err != nil {
207 return err
208 }
209 fmt.Fprintf(io.Out, "You typed: %s\n", text)
210 return nil
211}
212
213func runPassword(p prompter.Prompter, io *iostreams.IOStreams) error {
214 fmt.Fprintln(io.Out, "Demonstrating Password Input")

Callers

nothing calls this directly

Calls 1

InputMethod · 0.65

Tested by

no test coverage detected