db: Rename database configuration variables

*_DBNAME is not a good name for a variable that not only contains the
database name, but also the host and other potential options of the
database connection string.
This commit is contained in:
Clemens Lang
2017-07-22 18:14:53 +02:00
parent fd86cdda8e
commit 87558909c1
+2 -2
View File
@@ -28,11 +28,11 @@ var wwwDB *sql.DB
// Create connections to DBs
func init() {
var err error
tracDB, err = sql.Open("postgres", os.Getenv("TRAC_DBNAME"))
tracDB, err = sql.Open("postgres", os.Getenv("TRAC_DB"))
if err != nil {
log.Fatal(err)
}
wwwDB, err = sql.Open("postgres", os.Getenv("WWW_DBNAME"))
wwwDB, err = sql.Open("postgres", os.Getenv("WWW_DB"))
if err != nil {
log.Fatal(err)
}