package database import ( "fmt" "git.rouggy.com/rouggy/RaceBot/config" "github.com/jinzhu/gorm" _ "github.com/mattn/go-sqlite3" ) // SQLiteDBConnect : Create Connection to database func SQLiteDBConnect() { //Connect to database, exit when errored db, err = gorm.Open("sqlite3", "./"+config.DBName+".db") if err != nil { panic("[Database] Failed to connect to database") } fmt.Println("[Database] Database successfully connected") //If set true then print all executed queries to the console db.LogMode(true) }