Refactor code

This commit is contained in:
wenxu12345
2022-01-06 14:17:25 +08:00
parent fea89ad451
commit d5b5929e9b
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ func initMysqlDB() {
}
//Check the database and table during initialization
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1")
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName)
err = db.Exec(sql).Error
if err != nil {
log.NewError("0", "Exec failed ", err.Error(), sql)