check if arg
This commit is contained in:
@@ -32,16 +32,21 @@ func runStartCmd(cmd *cobra.Command, args []string) error {
|
|||||||
defer cleanup()
|
defer cleanup()
|
||||||
|
|
||||||
surveyTasks := initTasks(svc)
|
surveyTasks := initTasks(svc)
|
||||||
interfaces := initInterfaces()
|
|
||||||
|
|
||||||
if args[0] == "tui" {
|
interfaces := []task.Interface{}
|
||||||
interfaces = []task.Interface{tui.NewTui()}
|
|
||||||
}
|
if len(args) == 0 {
|
||||||
if args[0] == "repl" {
|
interfaces = initInterfaces()
|
||||||
interfaces = []task.Interface{repl.NewRepl()}
|
} else {
|
||||||
}
|
if args[0] == "tui" {
|
||||||
if args[0] == "web" {
|
interfaces = []task.Interface{tui.NewTui()}
|
||||||
interfaces = []task.Interface{web.NewWeb()}
|
}
|
||||||
|
if args[0] == "repl" {
|
||||||
|
interfaces = []task.Interface{repl.NewRepl()}
|
||||||
|
}
|
||||||
|
if args[0] == "web" {
|
||||||
|
interfaces = []task.Interface{web.NewWeb()}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := taskLoop(cmd.Context(), surveyTasks, interfaces); err != nil {
|
if err := taskLoop(cmd.Context(), surveyTasks, interfaces); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user