mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
EARFQUAKE
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/mizuw/laterna/server/globals"
|
||||
)
|
||||
|
||||
func ConnectDB() {
|
||||
db, err := sql.Open("sqlite3", "./db.sql")
|
||||
if err != nil {
|
||||
globals.DBLogger.Printf("An Error occured while connecting to the database: %v", err)
|
||||
}
|
||||
globals.DBLogger.Printf("Connected")
|
||||
defer db.Close()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
package database
|
||||
Reference in New Issue
Block a user