✨ Load store from config name
This commit is contained in:
parent
25ed67b2e9
commit
c703a26c10
2 changed files with 14 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ func GetFactory(name string) StoreFactory {
|
|||
}
|
||||
|
||||
func MakeStore(name string, conf config.Config) (Store, error) {
|
||||
if name == "" {
|
||||
name = conf.Conn.Store
|
||||
}
|
||||
|
||||
f, ok := factories[name]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("%w: %s", ErrNoFactory, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue