[FIX]修改配置文件
This commit is contained in:
@@ -29,13 +29,13 @@ func init() {
|
||||
log.Fatal(2, "Fail to get section 'database': %v", err)
|
||||
}
|
||||
|
||||
dbType = sec.Key("TYPE").String()
|
||||
dbName = sec.Key("NAME").String()
|
||||
user = sec.Key("USER").String()
|
||||
password = sec.Key("PASSWORD").String()
|
||||
host = sec.Key("HOST").String()
|
||||
port = sec.Key("PORT").String()
|
||||
tablePrefix = sec.Key("TABLE_PREFIX").String()
|
||||
dbType = sec.Key("Type").String()
|
||||
dbName = sec.Key("Name").String()
|
||||
user = sec.Key("User").String()
|
||||
password = sec.Key("Password").String()
|
||||
host = sec.Key("Host").String()
|
||||
port = sec.Key("Port").String()
|
||||
tablePrefix = sec.Key("TablePrefix").String()
|
||||
|
||||
db, err = gorm.Open(dbType, fmt.Sprintf("host=%s user=%s dbname=%s port=%s sslmode=disable password=%s",
|
||||
host,
|
||||
|
||||
Reference in New Issue
Block a user