return error from datastore.Close func

This commit is contained in:
Danny van Kooten 2018-07-15 09:20:07 +02:00
parent 1e128e6ad7
commit 1fea0dc66f
3 changed files with 5 additions and 5 deletions

View File

@ -60,6 +60,6 @@ func before(c *cli.Context) error {
} }
func after(c *cli.Context) error { func after(c *cli.Context) error {
app.database.Close() err := app.database.Close()
return nil return err
} }

View File

@ -51,7 +51,7 @@ type Datastore interface {
GetAggregatedReferrerStatsPageviews(time.Time, time.Time) (int, error) GetAggregatedReferrerStatsPageviews(time.Time, time.Time) (int, error)
// misc // misc
Close() Close() error
} }
// New instantiates a new datastore from the given configuration struct // New instantiates a new datastore from the given configuration struct

View File

@ -62,6 +62,6 @@ func (db *sqlstore) Migrate() {
} }
// Closes the db pool // Closes the db pool
func (db *sqlstore) Close() { func (db *sqlstore) Close() error {
db.DB.Close() return db.DB.Close()
} }