summaryrefslogtreecommitdiff
path: root/plugins/server
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-21 13:25:36 +0300
committerValery Piashchynski <[email protected]>2021-01-21 13:25:36 +0300
commit7da6c78449776e1f3c6716250bca0b712a0423a4 (patch)
treef3512de66aca2bba408485a0ea2fc936c0e4fb9b /plugins/server
parent0ff05b2732b4fd0783f959c94c54d7e39169f979 (diff)
Uniform all configs
Add debug server Check nil's for all plugin intialization
Diffstat (limited to 'plugins/server')
-rw-r--r--plugins/server/plugin.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index e4f7c577..0c9c49ea 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -39,6 +39,9 @@ type Plugin struct {
// Init application provider.
func (server *Plugin) Init(cfg config.Configurer, log logger.Logger) error {
const op = errors.Op("server_plugin_init")
+ if !cfg.Has(PluginName) {
+ return errors.E(op, errors.Disabled)
+ }
err := cfg.Unmarshal(&server.cfg)
if err != nil {
return errors.E(op, errors.Init, err)