MCPcopy Index your code
hub / github.com/cli/cli / Input

Method Input

internal/prompter/prompter.go:186–199  ·  view source on GitHub ↗
(prompt, defaultValue string)

Source from the content-addressed store, hash-verified

184}
185
186func (p *accessiblePrompter) Input(prompt, defaultValue string) (string, error) {
187 result := defaultValue
188 prompt = p.addDefaultsToPrompt(prompt, []string{defaultValue})
189 form := p.newForm(
190 huh.NewGroup(
191 huh.NewInput().
192 Title(prompt).
193 Value(&result),
194 ),
195 )
196
197 err := form.Run()
198 return result, err
199}
200
201func (p *accessiblePrompter) Password(prompt string) (string, error) {
202 var result string

Callers

nothing calls this directly

Calls 5

addDefaultsToPromptMethod · 0.95
newFormMethod · 0.95
ValueMethod · 0.80
TitleMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected