MCPcopy Create free account
hub / github.com/GetStream/stream-cli / runQuestionnaire

Function runQuestionnaire

pkg/cmd/config/config.go:135–150  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

133}
134
135func runQuestionnaire(cmd *cobra.Command) error {
136 var newAppConfig cfg.App
137 err := survey.Ask(questions(), &newAppConfig)
138 if err != nil {
139 return err
140 }
141
142 config := cfg.GetConfig(cmd)
143 err = config.Add(newAppConfig)
144 if err != nil {
145 return err
146 }
147
148 cmd.Println("Application successfully added. 🚀")
149 return nil
150}
151
152func questions() []*survey.Question {
153 return []*survey.Question{

Callers 1

newAppCmdFunction · 0.85

Calls 2

questionsFunction · 0.85
AddMethod · 0.80

Tested by

no test coverage detected