mirror of
https://github.com/macports/mpbot-github.git
synced 2026-07-13 03:18:39 -07:00
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:
+2
-2
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user