mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 08:14:25 +08:00
check numeric setting value, add numeric value range comment in config file
This commit is contained in:
@@ -98,8 +98,8 @@ func initializeDatabase(dbConfig *settings.DatabaseConfig) (*Database, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
engineGroup.SetMaxIdleConns(dbConfig.MaxIdleConnection)
|
||||
engineGroup.SetMaxOpenConns(dbConfig.MaxOpenConnection)
|
||||
engineGroup.SetMaxIdleConns(int(dbConfig.MaxIdleConnection))
|
||||
engineGroup.SetMaxOpenConns(int(dbConfig.MaxOpenConnection))
|
||||
engineGroup.SetConnMaxLifetime(time.Duration(dbConfig.ConnectionMaxLifeTime) * time.Second)
|
||||
|
||||
return &Database{
|
||||
|
||||
Reference in New Issue
Block a user