test sql connexion before launch
This commit is contained in:
parent
3f7fa58fd6
commit
c858b1b5e1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ func SqlDatabase(conf *Conf) {
|
||||||
db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", conf.Database.Username, conf.Database.Password, conf.Database.Ip, conf.Database.Port, conf.Database.Db))
|
db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s:%s)/%s", conf.Database.Username, conf.Database.Password, conf.Database.Ip, conf.Database.Port, conf.Database.Db))
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
DB = db
|
DB = db
|
||||||
|
SqlTest() //Test SQL conn
|
||||||
// if there is an error opening the connection, handle it
|
// if there is an error opening the connection, handle it
|
||||||
CheckErr(err)
|
CheckErr(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue