From 69db77ca4054d80ba2156b774a0c1467ff661c81 Mon Sep 17 00:00:00 2001 From: jloup Date: Fri, 4 May 2018 18:19:52 +0200 Subject: Allow to configure the type of Postgres connection (tcp or unix). --- db/db.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'db/db.go') diff --git a/db/db.go b/db/db.go index 2596dcb..25d404f 100644 --- a/db/db.go +++ b/db/db.go @@ -16,6 +16,7 @@ var ( ) type DBConfig struct { + Type string // tcp or unix Address string Database string User string @@ -109,6 +110,7 @@ func connect(config DBConfig) *pg.DB { User: config.User, Password: config.Password, Database: config.Database, + Network: config.Type, Addr: config.Address, }) } -- cgit v1.2.3