(cf func() (gh.Config, error), io *iostreams.IOStreams)
| 414 | } |
| 415 | |
| 416 | func CommentableInteractiveEditSurvey(cf func() (gh.Config, error), io *iostreams.IOStreams) func(string) (string, error) { |
| 417 | return func(initialValue string) (string, error) { |
| 418 | editorCommand, err := cmdutil.DetermineEditor(cf) |
| 419 | if err != nil { |
| 420 | return "", err |
| 421 | } |
| 422 | cs := io.ColorScheme() |
| 423 | fmt.Fprintf(io.Out, "- %s to draft your comment in %s... ", cs.Bold("Press Enter"), cs.Bold(surveyext.EditorName(editorCommand))) |
| 424 | _ = waitForEnter(io.In) |
| 425 | return surveyext.Edit(editorCommand, "*.md", initialValue, io.In, io.Out, io.ErrOut) |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | func CommentableInteractiveCreateIfNoneSurvey(p Prompt) func() (bool, error) { |
| 430 | return func() (bool, error) { |
no test coverage detected