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

Method InputHostname

internal/prompter/prompter.go:286–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284}
285
286func (p *accessiblePrompter) InputHostname() (string, error) {
287 var result string
288 form := p.newForm(
289 huh.NewGroup(
290 huh.NewInput().
291 Title("Hostname:").
292 Validate(ghinstance.HostnameValidator).
293 Value(&result),
294 ),
295 )
296
297 err := form.Run()
298 if err != nil {
299 return "", err
300 }
301 return result, nil
302}
303
304func (p *accessiblePrompter) MarkdownEditor(prompt, defaultValue string, blankAllowed bool) (string, error) {
305 var result string

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected