getQuickstartConfigKey resolves remaining missing prompts for App and API creation and returns the config map key for the selected framework. App/API selection and project detection are handled by the caller before this is invoked.
(cmd *cobra.Command, inputs *SetupInputs)
| 1274 | // and returns the config map key for the selected framework. |
| 1275 | // App/API selection and project detection are handled by the caller before this is invoked. |
| 1276 | func getQuickstartConfigKey(cmd *cobra.Command, inputs *SetupInputs) (string, bool, error) { |
| 1277 | if !inputs.App { |
| 1278 | return "", false, nil |
| 1279 | } |
| 1280 | |
| 1281 | wasAutoSelected, err := resolveSetupInputs(cmd, inputs) |
| 1282 | if err != nil { |
| 1283 | return "", false, err |
| 1284 | } |
| 1285 | |
| 1286 | if inputs.Type == "m2m" { |
| 1287 | return "m2m:none:none", false, nil |
| 1288 | } |
| 1289 | |
| 1290 | configKey := fmt.Sprintf("%s:%s:%s", inputs.Type, inputs.Framework, inputs.BuildTool) |
| 1291 | |
| 1292 | return configKey, wasAutoSelected, nil |
| 1293 | } |
| 1294 | |
| 1295 | // resolveSetupInputs validates and fills missing fields on inputs by prompting the user |
| 1296 | // where needed. It returns the updated inputs, whether a build tool was auto-selected, |