(cmd *cobra.Command)
| 133 | } |
| 134 | |
| 135 | func 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 | |
| 152 | func questions() []*survey.Question { |
| 153 | return []*survey.Question{ |