update config module

This commit is contained in:
2025-03-22 12:58:10 +03:00
parent 5e7d4033e4
commit 8f4b021a93
30 changed files with 437 additions and 375 deletions

View File

@ -65,8 +65,14 @@ func SearchCmd() *cli.Command {
Action: func(c *cli.Context) error {
ctx := c.Context
cfg := config.New()
err := cfg.Load()
if err != nil {
slog.Error(gotext.Get("Error loading config"), "err", err)
os.Exit(1)
}
db := database.New(cfg)
err := db.Init(ctx)
err = db.Init(ctx)
defer db.Close()
if err != nil {