From ec2b71734f0033a9d26a775d9896c839cfb34239 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Thu, 11 Jan 2018 19:53:53 -0800 Subject: [PATCH] Add more postgres defaults --- postgres/client.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/postgres/client.go b/postgres/client.go index e418469..3a7ff77 100644 --- a/postgres/client.go +++ b/postgres/client.go @@ -10,8 +10,8 @@ import ( "github.com/kcotugno/tacitus" ) -const connStr = `host={{.Host}} port={{.Port}} user={{.User}} ` + - `password={{.Password}} dbname={{.Name}} sslmode={{.SslMode}}` +const connStr = `host={{.Host}} dbname={{.Name}} port={{.Port}} user={{.User}} ` + + `password={{.Password}} sslmode={{.SslMode}}` type Client struct { Host string @@ -37,6 +37,9 @@ func NewClient() *Client { c.Host = "localhost" c.Port = 5432 + c.Name = "postgres" + c.User = "postgres" + c.Password = `""` c.SslMode = "disable" return &c