make db configurable

This commit is contained in:
2021-10-05 18:16:26 +02:00
parent 835801c0c6
commit 50b44d9762
3 changed files with 9 additions and 1 deletions

View File

@@ -374,7 +374,7 @@ func main() {
Lock: new(sync.RWMutex),
}
db.Client, err = ent.Open("sqlite3", "file:csgowtfd.db?_fk=1&cache=shared")
db.Client, err = ent.Open(conf.Db.Driver, conf.Db.ConnectTo)
if err != nil {
log.Panicf("Failed to open database %s: %v", "opencsgo.db", err)
}