Add more postgres defaults

This commit is contained in:
Kevin Cotugno 2018-01-11 19:53:53 -08:00
parent 7ed28c1940
commit ec2b71734f

View File

@ -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