This commit is contained in:
2013-02-11 23:17:12 -05:00
parent 54a0359897
commit 61d5532e33
6 changed files with 69 additions and 39 deletions

View File

@ -1,8 +1,8 @@
package main
import (
"errors"
"code.google.com/p/goconf/conf"
"errors"
)
type Storage interface {
@ -19,13 +19,13 @@ func GetStorage(config *conf.ConfigFile) (Storage, error) {
var storage Storage
switch storageMethod {
case "local":
storage, err = NewLocalStorage(config)
if err != nil {
return nil, err
}
default:
return nil, errors.New("Error: storage method '" + storageMethod + "' not implemented.")
case "local":
storage, err = NewLocalStorage(config)
if err != nil {
return nil, err
}
default:
return nil, errors.New("Error: storage method '" + storageMethod + "' not implemented.")
}
return storage, nil