first commit

This commit is contained in:
Robin Olsen
2026-01-31 16:00:23 +01:00
commit a3a1d71325
23 changed files with 614 additions and 0 deletions

32
cmd/cli/main.go Normal file
View File

@@ -0,0 +1,32 @@
package main
import (
"beadstest/cmd/cli/commands"
"beadstest/internal/service"
"context"
"fmt"
"os"
"github.com/steveyegge/beads"
)
func main() {
ctx := context.Background()
store, err := beads.NewSQLiteStorage(ctx, "./db.db")
handleError(err)
defer store.Close()
svc, err := service.NewService(ctx, store, "pm")
handleError(err)
defer svc.Close()
handleError(commands.Execute(svc))
}
func handleError(err error) {
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}