refactor: remove db package and move database logic to service layer

This commit is contained in:
2026-03-29 21:24:09 +02:00
parent 6ff013dd2a
commit 4ebcb88628
16 changed files with 163 additions and 217 deletions

View File

@@ -1,8 +1,8 @@
package cmd
import (
"axolotl/db"
"axolotl/output"
"axolotl/service"
"fmt"
"os"
"path/filepath"
@@ -22,7 +22,7 @@ var initCmd = &cobra.Command{
fmt.Fprintln(os.Stderr, "database already exists:", dbPath)
os.Exit(1)
}
if err := db.Init(dbPath); err != nil {
if err := service.InitNodeService(dbPath); err != nil {
fmt.Fprintln(os.Stderr, "failed to initialize:", err)
os.Exit(1)
}