summaryrefslogtreecommitdiff
path: root/plugins/memcached/memcachedkv/driver.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-10 19:05:37 +0300
committerValery Piashchynski <[email protected]>2021-09-10 19:05:37 +0300
commite94a80d4586d5a5fedc2edab850c5c8bad93395f (patch)
tree4272054647725274abb5ee69e355c1e4262760ea /plugins/memcached/memcachedkv/driver.go
parent8fa86886bd5b3c12cf161fb2c1cdd9a2cd53d1bf (diff)
fix issue with incorrectly parsing local and global configuration
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memcached/memcachedkv/driver.go')
-rw-r--r--plugins/memcached/memcachedkv/driver.go4
1 files changed, 4 insertions, 0 deletions
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...)