MCPcopy
hub / github.com/cli/cli / New

Function New

internal/prompter/prompter.go:55–81  ·  view source on GitHub ↗
(editorCmd string, io *iostreams.IOStreams)

Source from the content-addressed store, hash-verified

53}
54
55func New(editorCmd string, io *iostreams.IOStreams) Prompter {
56 if io.ExperimentalPrompterEnabled() {
57 return &huhPrompter{
58 stdin: io.In,
59 stdout: io.Out,
60 stderr: io.ErrOut,
61 editorCmd: editorCmd,
62 }
63 }
64
65 if io.AccessiblePrompterEnabled() {
66 return &accessiblePrompter{
67 stdin: io.In,
68 stdout: io.Out,
69 stderr: io.ErrOut,
70 editorCmd: editorCmd,
71 }
72 }
73
74 return &surveyPrompter{
75 prompter: ghPrompter.New(io.In, io.Out, io.ErrOut),
76 stdin: io.In,
77 stdout: io.Out,
78 stderr: io.ErrOut,
79 editorCmd: editorCmd,
80 }
81}
82
83type accessiblePrompter struct {
84 stdin ghPrompter.FileReader

Callers 5

newPrompterFunction · 0.92
NewClientFunction · 0.92
prompterRunFunction · 0.92
newTestSurveyPrompterFunction · 0.92

Calls 2

Tested by 2

newTestSurveyPrompterFunction · 0.74