From c10f375a5eda9e54e7df88eafa6f24cbcfce37b1 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 17 Sep 2015 19:49:25 -0300 Subject: [PATCH] Improved docs for #10 --- pgstore.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pgstore.go b/pgstore.go index d9debc2..03358e5 100644 --- a/pgstore.go +++ b/pgstore.go @@ -31,7 +31,8 @@ type Session struct { ExpiresOn time.Time `db:"expires_on"` } -// NewPGStore creates a new PGStore instance and a new database/sql pool +// NewPGStore creates a new PGStore instance and a new database/sql pool. +// This will also create in the database the schema needed by pgstore. func NewPGStore(dbURL string, keyPairs ...[]byte) *PGStore { db, err := sql.Open("postgres", dbURL) if err != nil { @@ -42,7 +43,8 @@ func NewPGStore(dbURL string, keyPairs ...[]byte) *PGStore { } // NewPGStoreFromPool creates a new PGStore instance from an existing -// database/sql pool +// database/sql pool. +// This will also create in the database the schema needed by pgstore. func NewPGStoreFromPool(db *sql.DB, keyPairs ...[]byte) *PGStore { dbmap := &gorp.DbMap{Db: db, Dialect: gorp.PostgresDialect{}}