Almost working!

Former-commit-id: b996f4f14f3ffd92fae77d86e92d077b35ea080c [formerly e4b74308ab158ad24bd6b3dc1ce615265f972e6c] [formerly 1ea38eac2569ba58e864f1edceb56daabff5e53d [formerly 5b619337df9e9dd04e47d9c2da29a92c31adfed3]]
Former-commit-id: 9117f9eeff1bbc259164b20f0561790b3c393319 [formerly c3c7b1c100c54a5ec0af528806e28b31c67da0ca]
Former-commit-id: 0d95a7f55f6f3ab9f89e1c5b34db927e5763c98d
This commit is contained in:
Henrique Dias
2017-08-20 08:42:38 +01:00
parent 764289e52f
commit 44ab20964c
11 changed files with 328 additions and 294 deletions

View File

@@ -2,6 +2,7 @@ package bolt
import (
"github.com/asdine/storm"
fm "github.com/hacdias/filemanager"
)
type ConfigStore struct {
@@ -9,7 +10,12 @@ type ConfigStore struct {
}
func (c ConfigStore) Get(name string, to interface{}) error {
return c.DB.Get("config", name, to)
err := c.DB.Get("config", name, to)
if err == storm.ErrNotFound {
return fm.ErrNotExist
}
return err
}
func (c ConfigStore) Save(name string, from interface{}) error {