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

Method MarkdownEditor

internal/prompter/prompter.go:562–576  ·  view source on GitHub ↗
(prompt, defaultValue string, blankAllowed bool)

Source from the content-addressed store, hash-verified

560}
561
562func (p *surveyPrompter) MarkdownEditor(prompt, defaultValue string, blankAllowed bool) (string, error) {
563 var result string
564 err := p.ask(&surveyext.GhEditor{
565 BlankAllowed: blankAllowed,
566 EditorCommand: p.editorCmd,
567 Editor: &survey.Editor{
568 Message: prompt,
569 Default: defaultValue,
570 FileName: "*.md",
571 HideDefault: true,
572 AppendDefault: true,
573 },
574 }, &result)
575 return result, err
576}
577
578func (p *surveyPrompter) ask(q survey.Prompt, response interface{}, opts ...survey.AskOpt) error {
579 opts = append(opts, survey.WithStdio(p.stdin, p.stdout, p.stderr))

Callers

nothing calls this directly

Calls 1

askMethod · 0.95

Tested by

no test coverage detected