forked from mirror/gorm
Add AfterInitialize error
This commit is contained in:
parent
0eba7a9ed1
commit
73c6d3e64e
4
gorm.go
4
gorm.go
|
@ -117,7 +117,9 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer func(opt Option) {
|
defer func(opt Option) {
|
||||||
opt.AfterInitialize(db)
|
if errr := opt.AfterInitialize(db); errr != nil {
|
||||||
|
err = errr
|
||||||
|
}
|
||||||
}(opt)
|
}(opt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue