Add mysqlCharset prop. Fix some dav bug.
This commit is contained in:
@ -38,8 +38,14 @@ func GetMysqlUrl(
|
||||
mysqlHost string,
|
||||
mysqlSchema string,
|
||||
mysqlUsername string,
|
||||
mysqlPassword string) string {
|
||||
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8&parseTime=True&loc=Local", mysqlUsername, mysqlPassword, mysqlHost, mysqlPort, mysqlSchema)
|
||||
mysqlPassword string,
|
||||
mysqlCharset string) string {
|
||||
|
||||
if mysqlCharset == "" {
|
||||
mysqlCharset = "utf8"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=%s&parseTime=True&loc=Local", mysqlUsername, mysqlPassword, mysqlHost, mysqlPort, mysqlSchema, mysqlCharset)
|
||||
}
|
||||
|
||||
//get random number 4.
|
||||
|
Reference in New Issue
Block a user