refactor: remove db package and move database logic to service layer
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user