From df5c9643a049521d8e6743a5c0a17e7c07ca4e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <jose.carlos@menteslibres.net> Date: Wed, 22 Jul 2015 11:58:00 -0500 Subject: [PATCH] Fixing example to include TEST_HOST. --- mongo/_example/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mongo/_example/main.go b/mongo/_example/main.go index 88420f85..e5603dbd 100644 --- a/mongo/_example/main.go +++ b/mongo/_example/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "os" "time" "upper.io/db" // Imports the main db package. @@ -23,6 +24,10 @@ type Birthday struct { func main() { + if os.Getenv("TEST_HOST") != "" { + settings.Host = os.Getenv("TEST_HOST") + } + // Attemping to establish a connection to the database. sess, err := db.Open("mongo", settings) -- GitLab