liujiandao
2023-11-20 6a132d799ea1256a7f570a759af6165e0654cc5a
1
2
3
4
5
6
7
8
9
10
11
12
13
package config
 
type Mysql struct {
    GeneralDB `yaml:",inline" mapstructure:",squash"`
}
 
func (m *Mysql) Dsn() string {
    return m.Username + ":" + m.Password + "@tcp(" + m.Path + ":" + m.Port + ")/" + m.Dbname + "?" + m.Config
}
 
func (m *Mysql) GetLogMode() string {
    return m.LogMode
}