feat: Add to init command create table to db
Some checks failed
CI.yml / build (push) Failing after 1m36s
Some checks failed
CI.yml / build (push) Failing after 1m36s
This commit is contained in:
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user