add Store Close method (#1500)

* add Store Close method

* Update sync store build failure
This commit is contained in:
Asim Aslam
2020-04-08 09:51:10 +01:00
committed by GitHub
parent 4cac7dcc48
commit 4b0e27413e
11 changed files with 56 additions and 10 deletions

View File

@@ -36,6 +36,13 @@ type sqlStore struct {
options store.Options
}
func (s *sqlStore) Close() error {
if s.db != nil {
return s.db.Close()
}
return nil
}
func (s *sqlStore) Init(opts ...store.Option) error {
for _, o := range opts {
o(&s.options)