good morning!!!!

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

Removing db.Settings from example.

parent b2f43268
No related branches found
No related tags found
No related merge requests found
......@@ -6,13 +6,13 @@ import (
"os"
"time"
"upper.io/db" // Imports the main db package.
_ "upper.io/db/postgresql" // Imports the postgresql adapter.
"upper.io/db" // Imports the main db package.
"upper.io/db/postgresql" // Imports the postgresql adapter.
)
var settings = db.Settings{
var settings = postgresql.ConnectionURL{
Database: `upperio_tests`, // Database name.
Host: `127.0.0.1`,
Address: db.ParseAddress(`127.0.0.1`),
User: `upperio_tests`, // Database username.
Password: `upperio_secret`, // Database password.
}
......@@ -27,8 +27,8 @@ type Birthday struct {
func main() {
if os.Getenv("TEST_HOST") != "" {
settings.Host = os.Getenv("TEST_HOST")
if addr := os.Getenv("TEST_HOST"); addr != "" {
settings.Address = db.ParseAddress(addr)
}
// Attemping to establish a connection to the database.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment