mock defer
This commit is contained in:
parent
55378a61a3
commit
d7064f138a
10
gorm.go
10
gorm.go
@ -135,11 +135,11 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
|
|||||||
if applyErr := opt.Apply(config); applyErr != nil {
|
if applyErr := opt.Apply(config); applyErr != nil {
|
||||||
return nil, applyErr
|
return nil, applyErr
|
||||||
}
|
}
|
||||||
defer func(opt Option) {
|
//defer func(opt Option) {
|
||||||
if errr := opt.AfterInitialize(db); errr != nil {
|
// if errr := opt.AfterInitialize(db); errr != nil {
|
||||||
err = errr
|
// err = errr
|
||||||
}
|
// }
|
||||||
}(opt)
|
//}(opt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user