Make ees and ers opts into structs (incomplete)

This commit is contained in:
ionutboangiu
2021-11-24 16:32:16 +02:00
committed by Dan Christian Bogos
parent ac171f050e
commit aa0ae292a2
9 changed files with 1164 additions and 10 deletions

View File

@@ -120,7 +120,7 @@ func openDB(dialect gorm.Dialector, opts map[string]interface{}) (db *gorm.DB, s
}
sqlDB.SetMaxOpenConns(int(val))
}
if iface, has := opts[utils.SQLMaxConnLifetime]; has {
if iface, has := opts[utils.SQLConnMaxLifetime]; has {
val, err := utils.IfaceAsDuration(iface)
if err != nil {
return nil, nil, err