[WIP] Task editing
This commit is contained in:
14
main.go
14
main.go
@ -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]().
|
||||
|
||||
Reference in New Issue
Block a user