mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 16:41:28 +08:00
Use log.Fatal isntead of panic
This commit is contained in:
parent
dd013a1626
commit
5656fb96d1
6
db/db.go
6
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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user