make tasks use map instead of slice
This commit is contained in:
@@ -4,11 +4,6 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
InterfaceType string
|
||||
Task int
|
||||
)
|
||||
|
||||
// RootCmd is the base command for the survey CLI.
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "survey",
|
||||
@@ -24,6 +19,4 @@ Your responses will be kept confidential and used solely for research purposes.`
|
||||
|
||||
func init() {
|
||||
RootCmd.CompletionOptions.DisableDefaultCmd = true
|
||||
StartCmd.Flags().StringVarP(&InterfaceType, "interface", "i", "tui", "Specify interface.")
|
||||
StartCmd.Flags().IntVarP(&Task, "task", "t", 1, "Run task directly")
|
||||
}
|
||||
|
||||
@@ -2,8 +2,18 @@ package surveyCmd
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
var (
|
||||
InterfaceType string
|
||||
Task string
|
||||
)
|
||||
|
||||
// StartCmd is the start command - RunE is set in cmd/survey/
|
||||
var StartCmd = &cobra.Command{
|
||||
Use: "start",
|
||||
Short: "Start the user survey",
|
||||
}
|
||||
|
||||
func init() {
|
||||
StartCmd.Flags().StringVarP(&Task, "task", "t", "", "Specify task.")
|
||||
StartCmd.Flags().StringVarP(&InterfaceType, "interface", "i", "", "Specify interface.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user