update
This commit is contained in:
17
mymysql/option.go
Normal file
17
mymysql/option.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package mymysql
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Opt func(m *MysqlDb)
|
||||
|
||||
func WithDisablePing(v bool) Opt {
|
||||
return func(m *MysqlDb) {
|
||||
m.disablePing = v
|
||||
}
|
||||
}
|
||||
|
||||
func WithGormConfig(v *gorm.Config) Opt {
|
||||
return func(m *MysqlDb) {
|
||||
m.gormConfig = v
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user