Fix apply option

This commit is contained in:
Jinzhu 2021-03-26 14:20:42 +08:00
parent a8b72546c1
commit 0eba7a9ed1
1 changed files with 2 additions and 2 deletions

View File

@ -116,9 +116,9 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
if err := opt.Apply(config); err != nil {
return nil, err
}
defer func() {
defer func(opt Option) {
opt.AfterInitialize(db)
}()
}(opt)
}
}