diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2017-10-01 01:07:05 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2017-10-03 15:01:38 +0200 |
commit | 7f0771d0a9caf2d3294bfced9e66fac03334d9ba (patch) | |
tree | 37f07c087e36b025503ffbae3a07eebcc3acc649 /storage/local | |
parent | c04bbf9c82f216891ba44b8b5b621b8020963086 (diff) | |
download | petrific-7f0771d0a9caf2d3294bfced9e66fac03334d9ba.tar.gz petrific-7f0771d0a9caf2d3294bfced9e66fac03334d9ba.tar.bz2 petrific-7f0771d0a9caf2d3294bfced9e66fac03334d9ba.zip |
Redo storage config
Diffstat (limited to 'storage/local')
-rw-r--r-- | storage/local/local.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/local/local.go b/storage/local/local.go index 4869bb2..7dc59cb 100644 --- a/storage/local/local.go +++ b/storage/local/local.go @@ -26,12 +26,13 @@ type LocalStorage struct { } func LocalStorageFromConfig(conf config.Config, name string) (storage.Storage, error) { - var path string - if err := conf.Storage[name].Get("path", &path); err != nil { + var path_wrap struct{ Path string } + + if err := conf.GetStorageConfData(name, &path_wrap); err != nil { return nil, err } - return OpenLocalStorage(config.ExpandTilde(path)) + return OpenLocalStorage(config.ExpandTilde(path_wrap.Path)) } func OpenLocalStorage(path string) (l LocalStorage, err error) { |