summaryrefslogtreecommitdiff
path: root/plugins/server/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/server/plugin.go')
-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)