Files
LazyPM/internal/commands/survey/start.go
2026-02-28 10:44:41 +01:00

26 lines
712 B
Go

package surveyCmd
import (
"github.com/LazyBachelor/LazyPM/internal/commands"
"github.com/LazyBachelor/LazyPM/pkg/task"
"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.")
StartCmd.RegisterFlagCompletionFunc("task", commands.CompletionFunc(task.ListTasks()))
StartCmd.RegisterFlagCompletionFunc("interface", commands.CompletionFunc(task.ListInterfaces()))
}