From e94a80d4586d5a5fedc2edab850c5c8bad93395f Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Fri, 10 Sep 2021 19:05:37 +0300 Subject: fix issue with incorrectly parsing local and global configuration Signed-off-by: Valery Piashchynski --- plugins/memcached/memcachedkv/driver.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/memcached/memcachedkv/driver.go') diff --git a/plugins/memcached/memcachedkv/driver.go b/plugins/memcached/memcachedkv/driver.go index 6d5e1802..dcb071b4 100644 --- a/plugins/memcached/memcachedkv/driver.go +++ b/plugins/memcached/memcachedkv/driver.go @@ -32,6 +32,10 @@ func NewMemcachedDriver(log logger.Logger, key string, cfgPlugin config.Configur return nil, errors.E(op, err) } + if s.cfg == nil { + return nil, errors.E(op, errors.Errorf("config not found by provided key: %s", key)) + } + s.cfg.InitDefaults() m := memcache.New(s.cfg.Addr...) -- cgit v1.2.3