aboutsummaryrefslogtreecommitdiffstats
path: root/store.go
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2018-12-28 18:57:07 -0500
committerThibaut Horel <thibaut.horel@gmail.com>2018-12-28 18:57:07 -0500
commit33389b0719c78de5fc5694a173f951b3666c183b (patch)
tree57a3f2574d9173812d09b874aebcfd73a7358679 /store.go
parent04cf96cdc3ef6c78b2d4754e3c8028b5c1c45fc0 (diff)
downloadid-33389b0719c78de5fc5694a173f951b3666c183b.tar.gz
Read database address from command line args
Diffstat (limited to 'store.go')
-rw-r--r--store.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store.go b/store.go
index 1f0ca76..1c8348f 100644
--- a/store.go
+++ b/store.go
@@ -28,8 +28,8 @@ type PgStore struct {
sessionCache map[string]*Session
}
-func NewPgStore() *PgStore {
- db, err := sql.Open("postgres", "postgres://auth_master:pass@localhost/authdb")
+func NewPgStore(database string) *PgStore {
+ db, err := sql.Open("postgres", database)
if err != nil {
log.Panic(err)
}