From 5656fb96d14cbcb5a72077ec7962097002ff113a Mon Sep 17 00:00:00 2001 From: maru Date: Sat, 11 May 2024 02:24:20 -0400 Subject: [PATCH] Use log.Fatal isntead of panic --- db/db.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/db.go b/db/db.go index 944b8fb..4091137 100644 --- a/db/db.go +++ b/db/db.go @@ -50,7 +50,7 @@ func Init(username, password, protocol, address, database string) error { tx, err := handle.Begin() if err != nil { - panic(err) + log.Fatal(err) } // accounts @@ -83,7 +83,7 @@ func Init(username, password, protocol, address, database string) error { err = tx.Commit() if err != nil { - panic(err) + log.Fatal(err) } // TODO temp code @@ -99,7 +99,7 @@ func Init(username, password, protocol, address, database string) error { entries, err := os.ReadDir("userdata") if err != nil { - log.Fatalln(err) + log.Fatal(err) return nil }