Skip to content

Commit e8d5090

Browse files
committed
add mysql option
1 parent 586804b commit e8d5090

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ type MysqlInstance struct {
5757
User string `json:"user"`
5858
Pwd string `json:"password"`
5959
Db string `json:"db"`
60+
Option string `json:"option"`
6061
Version string `json:"version"`
6162
Port int `json:"port"`
6263
ReadOnly bool `json:"read_only"`
6364
}
6465

6566
func (inst MysqlInstance) String() string {
66-
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8", inst.User, inst.Pwd, inst.Host, inst.Port, inst.Db)
67+
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8&%s", inst.User, inst.Pwd, inst.Host, inst.Port, inst.Db, inst.Option)
6768
}
6869

6970
// RedisConfig for redis

0 commit comments

Comments
 (0)