liujiandao
2024-03-14 ac0318fc8120bb1452220fd8e586b8e04a1df26a
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
}