construct structs

This commit is contained in:
Robin Olsen
2026-02-12 19:59:05 +01:00
parent f9fe03a451
commit ba4394ecdc
3 changed files with 10 additions and 3 deletions

View File

@@ -14,6 +14,8 @@ func main() {
StatisticsStoragePath: "./.pm/stats.json", StatisticsStoragePath: "./.pm/stats.json",
} }
cli := cli.NewCli()
if err := cli.Run(context.Background(), config); err != nil { if err := cli.Run(context.Background(), config); err != nil {
return return
} }

View File

@@ -13,7 +13,9 @@ func main() {
IssuePrefix: "pm", IssuePrefix: "pm",
} }
if _, err := tui.Run(context.Background(), config); err != nil { tui := tui.NewTui()
if err := tui.Run(context.Background(), config); err != nil {
panic(err) panic(err)
} }
} }

View File

@@ -1,14 +1,17 @@
package main package main
import ( import (
"github.com/LazyBachelor/LazyPM/internal/service"
"github.com/LazyBachelor/LazyPM/pkg/web"
"context" "context"
"fmt" "fmt"
"os" "os"
"github.com/LazyBachelor/LazyPM/internal/service"
"github.com/LazyBachelor/LazyPM/pkg/web"
) )
func main() { func main() {
web := web.NewWeb()
config := service.Config{ config := service.Config{
WebAddress: "localhost:8080", WebAddress: "localhost:8080",
BeadsDBPath: "./.pm/db.db", BeadsDBPath: "./.pm/db.db",