From 87558909c1ab53efba3eaf59d15d78eb2d313328 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Sat, 22 Jul 2017 18:14:53 +0200 Subject: [PATCH] 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. --- pr/db/dbutil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr/db/dbutil.go b/pr/db/dbutil.go index 5f41bcd..d8b5b7e 100644 --- a/pr/db/dbutil.go +++ b/pr/db/dbutil.go @@ -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) }