diff --git a/db.go b/db.go index 7d8bfb5..f931e15 100644 --- a/db.go +++ b/db.go @@ -15,6 +15,10 @@ type Database struct { func InitDatabase(database *Database, conn *sql.DB) { panicOnNil(database) + if database.db != nil { + panic("database is initialized already") + } + *database = Database{ db: conn, stmts: map[string]*sql.Stmt{},