Only check for username and password if driver type is mysql

pull/54/head
Aaron Ogle 6 years ago
parent bf7d422039
commit 3722c6ba79
No known key found for this signature in database
GPG Key ID: 87F6DE6202656163
  1. 2
      app.go

@ -370,7 +370,7 @@ func Serve() {
app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64) app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64)
// Check database configuration // Check database configuration
if app.cfg.Database.User == "" || app.cfg.Database.Password == "" { if app.cfg.Database.Type == "mysql" && (app.cfg.Database.User == "" || app.cfg.Database.Password == "") {
log.Error("Database user or password not set.") log.Error("Database user or password not set.")
os.Exit(1) os.Exit(1)
} }

Loading…
Cancel
Save