package cmd import ( "fmt" "github.com/manifoldco/promptui" "github.com/spf13/cobra" ) const oldModuleName = "app_tmpl" type MainTemplateData struct { ModuleName string ServiceName string UseGRPC bool } func init() { rootCmd.AddCommand(newCmd) } var newCmd = &cobra.Command{ Use: "new", Short: "Create a new Draft project", Long: `Create a new Draft project with the necessary structure and files.`, Run: genProject, } func genProject(cmd *cobra.Command, args []string) { projType := promptui.Select{ Label: "Select Project Type", Items: []string{"API", "Client", "Full Stack"}, } _, result, err := projType.Run() if err != nil { fmt.Printf("Prompt failed %v\n", err) return } switch result { case "API": genAPI(cmd, args) case "Client": genClient(cmd, args) case "Full Stack": genMonorepo(cmd, args) default: fmt.Println("Invalid selection") } }