good morning!!!!

Skip to content
Snippets Groups Projects
Commit 3d9fec41 authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Merge branch 'v2' into issue-84

parents 726480c1 025e7461
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ package main
import (
"fmt"
"log"
"os"
"time"
"upper.io/db" // Imports the main db package.
......@@ -11,9 +12,9 @@ import (
var settings = db.Settings{
Database: `upperio_tests`, // Database name.
Host: `testserver.local`,
User: `upperio`, // Database username.
Password: `upperio`, // Database password.
Host: `127.0.0.1`,
User: `upperio_tests`, // Database username.
Password: `upperio_secret`, // Database password.
}
// Birthday example struct.
......@@ -26,6 +27,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("postgresql", settings)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment