2021-11-15 23:50:28 +08:00
|
|
|
package config
|
|
|
|
|
|
|
|
type Mysql struct {
|
2022-05-22 17:52:14 +08:00
|
|
|
GeneralDB `yaml:",inline" mapstructure:",squash"`
|
2021-11-15 23:50:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Mysql) Dsn() string {
|
|
|
|
return m.Username + ":" + m.Password + "@tcp(" + m.Path + ":" + m.Port + ")/" + m.Dbname + "?" + m.Config
|
|
|
|
}
|