From 7f0771d0a9caf2d3294bfced9e66fac03334d9ba Mon Sep 17 00:00:00 2001
From: Laria Carolin Chabowski <laria@laria.me>
Date: Sun, 1 Oct 2017 01:07:05 +0200
Subject: Redo storage config

---
 storage/registry/registry.go | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'storage/registry')

diff --git a/storage/registry/registry.go b/storage/registry/registry.go
index ad66c6a..f792946 100644
--- a/storage/registry/registry.go
+++ b/storage/registry/registry.go
@@ -35,13 +35,9 @@ func (e storageConfErr) Error() string {
 }
 
 func loadStorage(conf config.Config, storageName string) (storage.Storage, error) {
-	storageOptions, ok := conf.Storage[storageName]
-	if !ok {
-		return nil, notFoundErr
-	}
+	method, err := conf.GetStorageMethod(storageName)
 
-	var method string
-	if err := storageOptions.Get("method", &method); err != nil {
+	if err != nil {
 		return nil, err
 	}
 
-- 
cgit v1.2.3-70-g09d2