Clean up task editor and time editor

This commit is contained in:
Martin Pander
2026-02-17 20:57:21 +01:00
parent 6e60698526
commit 1a9fd9b4b0
10 changed files with 141 additions and 115 deletions

View File

@@ -40,12 +40,15 @@ func main() {
timewConfigPath = ""
}
ts := taskwarrior.NewTaskSquire(taskrcPath)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ts := taskwarrior.NewTaskSquire(ctx, taskrcPath)
if ts == nil {
log.Fatal("Failed to initialize TaskSquire. Please check your Taskwarrior installation and taskrc file.")
}
tws := timewarrior.NewTimeSquire(timewConfigPath)
ctx := context.Background()
tws := timewarrior.NewTimeSquire(ctx, timewConfigPath)
common := common.NewCommon(ctx, ts, tws)
file, err := os.OpenFile("/tmp/tasksquire.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)