From 7dc6420854000dc1e0c8b44466e41813cc21db73 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Thu, 12 Feb 2026 22:06:10 +0100 Subject: [PATCH] move around types for better understanding --- cmd/survey/tasks/types.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/cmd/survey/tasks/types.go b/cmd/survey/tasks/types.go index bfc9e87..74af23c 100644 --- a/cmd/survey/tasks/types.go +++ b/cmd/survey/tasks/types.go @@ -4,26 +4,14 @@ import ( "context" "github.com/LazyBachelor/LazyPM/internal/service" - tea "github.com/charmbracelet/bubbletea" ) +type TaskConfig = service.Config + type Interface interface { - Run(context.Context, service.Config) error + Run(context.Context, TaskConfig) error } +type ConfigFunc func() TaskConfig type ValidateFunc func(context.Context, *service.Services) (ok bool, err error) type DbStateFunc func(context.Context, *service.Services) error - -type Task struct { - interfaceType Interface - aboutScreen tea.Model - questionnaire tea.Model - - validateFunc ValidateFunc - dbStateFunc DbStateFunc -} - -type TaskList struct { - Todo []*Task - Done []*Task -}