From cbfbb6a0bbc25cc74d2d57514af4c45723bc205a Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Thu, 12 Feb 2026 22:07:03 +0100 Subject: [PATCH] add init file for better separation --- cmd/survey/init.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cmd/survey/init.go diff --git a/cmd/survey/init.go b/cmd/survey/init.go new file mode 100644 index 0000000..84f7609 --- /dev/null +++ b/cmd/survey/init.go @@ -0,0 +1,32 @@ +package main + +import ( + "context" + + "github.com/LazyBachelor/LazyPM/cmd/survey/tasks" + "github.com/LazyBachelor/LazyPM/internal/service" + "github.com/LazyBachelor/LazyPM/pkg/cli/repl" + "github.com/LazyBachelor/LazyPM/pkg/tui" + "github.com/LazyBachelor/LazyPM/pkg/web" +) + +func initializeServices(ctx context.Context) (*service.Services, func(), error) { + config := service.Config{ + IssuePrefix: "pm", + BeadsDBPath: "./.pm/db.db", + StatisticsStoragePath: "./.pm/stats.json", + WebAddress: "localhost:8080", + } + return service.NewServices(ctx, config) +} + +func initTasks() []*tasks.Task { + return []*tasks.Task{ + tasks.NewCreateIssueTask(), + tasks.NewCreateIssueTask(), + } +} + +func initInterfaces() []tasks.Interface { + return []tasks.Interface{repl.NewRepl(), tui.NewTui(), web.NewWeb()} +}