|
|
|
@ -196,7 +196,7 @@ func GetDsn(conf DBConf) string { |
|
|
|
host := MayReplaceLocalhost(conf.Host) |
|
|
|
driver := conf.Driver |
|
|
|
dsn := map[string]string{ |
|
|
|
"mysql": fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=Local", |
|
|
|
"mysql": fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&parseTime=true&loc=Local&interpolateParams=true", |
|
|
|
conf.User, conf.Password, host, conf.Port, ""), |
|
|
|
"postgres": fmt.Sprintf("host=%s user=%s password=%s dbname='%s' port=%d sslmode=disable", |
|
|
|
host, conf.User, conf.Password, "", conf.Port), |
|
|
|
|