(cf func() (gh.Config, error), io *iostreams.IOStreams)
| 312 | } |
| 313 | |
| 314 | func CommentableInteractiveEditSurvey(cf func() (gh.Config, error), io *iostreams.IOStreams) func(string) (string, error) { |
| 315 | return func(initialValue string) (string, error) { |
| 316 | editorCommand, err := cmdutil.DetermineEditor(cf) |
| 317 | if err != nil { |
| 318 | return "", err |
| 319 | } |
| 320 | cs := io.ColorScheme() |
| 321 | fmt.Fprintf(io.Out, "- %s to draft your comment in %s... ", cs.Bold("Press Enter"), cs.Bold(surveyext.EditorName(editorCommand))) |
| 322 | _ = waitForEnter(io.In) |
| 323 | return surveyext.Edit(editorCommand, "*.md", initialValue, io.In, io.Out, io.ErrOut) |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | func CommentableInteractiveCreateIfNoneSurvey(p Prompt) func() (bool, error) { |
| 328 | return func() (bool, error) { |
no test coverage detected