feat: Add to init command create table to db
Some checks failed
CI.yml / build (push) Failing after 1m36s

This commit is contained in:
d3m0k1d
2026-01-13 23:22:14 +03:00
parent a57e81a1e5
commit f463b95f63

View File

@@ -81,6 +81,19 @@ var initCmd = &cobra.Command{
fmt.Println(err)
os.Exit(1)
}
db, err := storage.NewDB()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
db.CreateTable()
defer func() {
err = db.Close()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}()
fmt.Println("Firewall detected and configured")
fmt.Println("BanForge initialized successfully!")