Skip to content

Commit

Permalink
fix variable shadowing (#5212)
Browse files Browse the repository at this point in the history
Co-authored-by: Shenao Zhang <shenao.zhang@shopee.com>
  • Loading branch information
ZhangShenao and Shenao Zhang committed Mar 31, 2022
1 parent ea8509b commit 8333844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gorm.go
Expand Up @@ -124,8 +124,8 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {

for _, opt := range opts {
if opt != nil {
if err := opt.Apply(config); err != nil {
return nil, err
if applyErr := opt.Apply(config); applyErr != nil {
return nil, applyErr
}
defer func(opt Option) {
if errr := opt.AfterInitialize(db); errr != nil {
Expand Down

0 comments on commit 8333844

Please sign in to comment.