Add more postgres defaults
This commit is contained in:
parent
7ed28c1940
commit
ec2b71734f
@ -10,8 +10,8 @@ import (
|
|||||||
"github.com/kcotugno/tacitus"
|
"github.com/kcotugno/tacitus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const connStr = `host={{.Host}} port={{.Port}} user={{.User}} ` +
|
const connStr = `host={{.Host}} dbname={{.Name}} port={{.Port}} user={{.User}} ` +
|
||||||
`password={{.Password}} dbname={{.Name}} sslmode={{.SslMode}}`
|
`password={{.Password}} sslmode={{.SslMode}}`
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
Host string
|
Host string
|
||||||
@ -37,6 +37,9 @@ func NewClient() *Client {
|
|||||||
|
|
||||||
c.Host = "localhost"
|
c.Host = "localhost"
|
||||||
c.Port = 5432
|
c.Port = 5432
|
||||||
|
c.Name = "postgres"
|
||||||
|
c.User = "postgres"
|
||||||
|
c.Password = `""`
|
||||||
c.SslMode = "disable"
|
c.SslMode = "disable"
|
||||||
|
|
||||||
return &c
|
return &c
|
||||||
|
Reference in New Issue
Block a user