✨ init project
This commit is contained in:
9
config/gorm_mysql.go
Normal file
9
config/gorm_mysql.go
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user