diff --git a/cve-alert-fetcher/cmd/root.go b/cve-alert-fetcher/cmd/root.go index b465e6a..e88755a 100644 --- a/cve-alert-fetcher/cmd/root.go +++ b/cve-alert-fetcher/cmd/root.go @@ -77,7 +77,7 @@ All parameters (such as access data) can be specified both on the command line a Msg("config variable cveDatabase.dataSourceName is not set") return } - db, err = sqlx.Open(viper.GetString("cveDatabase.driverName"), viper.GetString("cveDatabase.dataSourceName")) + db, err = sqlx.Connect(viper.GetString("cveDatabase.driverName"), viper.GetString("cveDatabase.dataSourceName")) if err != nil { log.Error(). AnErr("Error", err). diff --git a/cve-alert-restapi/cmd/root.go b/cve-alert-restapi/cmd/root.go index acc0857..337b1a2 100644 --- a/cve-alert-restapi/cmd/root.go +++ b/cve-alert-restapi/cmd/root.go @@ -64,7 +64,7 @@ All parameters (such as access data) can be specified both on the command line a Msg("config variable cveDatabase.dataSourceName is not set") return } - db, err = sqlx.Open(viper.GetString("cveDatabase.driverName"), viper.GetString("cveDatabase.dataSourceName")) + db, err = sqlx.Connect(viper.GetString("cveDatabase.driverName"), viper.GetString("cveDatabase.dataSourceName")) if err != nil { log.Error(). AnErr("Error", err).