diff options
author | Valery Piashchynski <[email protected]> | 2021-09-10 19:05:37 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-10 19:05:37 +0300 |
commit | e94a80d4586d5a5fedc2edab850c5c8bad93395f (patch) | |
tree | 4272054647725274abb5ee69e355c1e4262760ea /plugins/memory/memorykv/kv.go | |
parent | 8fa86886bd5b3c12cf161fb2c1cdd9a2cd53d1bf (diff) |
fix issue with incorrectly parsing local and global configuration
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memory/memorykv/kv.go')
-rw-r--r-- | plugins/memory/memorykv/kv.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/memory/memorykv/kv.go b/plugins/memory/memorykv/kv.go index 9b3e176c..5383275c 100644 --- a/plugins/memory/memorykv/kv.go +++ b/plugins/memory/memorykv/kv.go @@ -33,6 +33,10 @@ func NewInMemoryDriver(key string, log logger.Logger, cfgPlugin config.Configure return nil, errors.E(op, err) } + if d.cfg == nil { + return nil, errors.E(op, errors.Errorf("config not found by provided key: %s", key)) + } + d.cfg.InitDefaults() go d.gc() |