refactor to use app package instead of service

refactor app to be composable
This commit is contained in:
Robin Olsen
2026-02-28 23:30:31 +01:00
parent ba4d3df669
commit aabce0b0b2
56 changed files with 385 additions and 279 deletions

View File

@@ -1,7 +1,7 @@
package surveyCmd
package survey
import (
"github.com/LazyBachelor/LazyPM/internal/utils"
"github.com/LazyBachelor/LazyPM/internal/utils/shellcomp"
"github.com/LazyBachelor/LazyPM/pkg/task"
"github.com/spf13/cobra"
)
@@ -20,6 +20,6 @@ var StartCmd = &cobra.Command{
func init() {
StartCmd.Flags().StringVarP(&Task, "task", "t", "", "Specify task.")
StartCmd.Flags().StringVarP(&InterfaceType, "interface", "i", "", "Specify interface.")
StartCmd.RegisterFlagCompletionFunc("task", utils.CompletionFunc(task.ListTasks()))
StartCmd.RegisterFlagCompletionFunc("interface", utils.CompletionFunc(task.ListInterfaces()))
StartCmd.RegisterFlagCompletionFunc("task", shellcomp.CompletionFunc(task.ListTasks()))
StartCmd.RegisterFlagCompletionFunc("interface", shellcomp.CompletionFunc(task.ListInterfaces()))
}