refine architecture

change module name to repo
This commit is contained in:
Robin Olsen
2026-02-02 11:22:20 +01:00
parent 4225d202bb
commit 0dcfe3989d
32 changed files with 822 additions and 114 deletions

View File

@@ -1,31 +1,21 @@
package main
import (
"beadstest/cmd/cli/commands"
"beadstest/internal/service"
"github.com/LazyBachelor/LazyPM/internal/service"
"github.com/LazyBachelor/LazyPM/pkg/cli"
"context"
"fmt"
"os"
"github.com/steveyegge/beads"
)
func main() {
ctx := context.Background()
config := service.Config{
IssuePrefix: "pm",
BeadsDBPath: "./.pm/db.db",
StatisticsStoragePath: "./.pm/stats.json",
}
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 {
if err := cli.Run(context.Background(), config); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}