[WIP] Task editing

This commit is contained in:
Martin
2024-05-24 06:51:06 +02:00
parent fe00170a5c
commit 1086b19765
7 changed files with 334 additions and 16 deletions

14
main.go
View File

@ -3,6 +3,8 @@ package main
import (
"context"
"fmt"
"log"
"log/slog"
"os"
"tasksquire/common"
@ -17,6 +19,18 @@ func main() {
ctx := context.Background()
common := common.NewCommon(ctx, ts)
file, err := os.OpenFile("app.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
log.Fatalf("failed to open log file: %v", err)
}
defer file.Close()
// Create a new slog handler for the file
handler := slog.NewTextHandler(file, &slog.HandlerOptions{})
// Set the default logger to use the file handler
slog.SetDefault(slog.New(handler))
// form := huh.NewForm(
// huh.NewGroup(
// huh.NewSelect[string]().