diff --git a/plugins/config/middle.gen.go b/plugins/config/middle.gen.go index 8030d69..c989fd7 100644 --- a/plugins/config/middle.gen.go +++ b/plugins/config/middle.gen.go @@ -12,8 +12,9 @@ import ( func GetMiddlewareMap() map[string]plugins.PluginInterface { mockPlugin := mockPlugin.NewPlugin() - return map[string]plugins.PluginInterface{ + mockPlugin.Init() + return map[string]plugins.PluginInterface{ mockPlugin.Name(): mockPlugin, } } diff --git a/plugins/config/middle.template b/plugins/config/middle.template index a11e1d6..b90bd12 100644 --- a/plugins/config/middle.template +++ b/plugins/config/middle.template @@ -14,9 +14,10 @@ import ( func GetMiddlewareMap() map[string]plugins.PluginInterface { {%for dir in dirs %} {{dir[0]}}:={{dir[0]}}.NewPlugin() - {%- endfor%} + {{dir[0]}}.Init() + {% endfor%} return map[string]plugins.PluginInterface{ - {%for dir in dirs %} + {%for dir in dirs -%} {{dir[0]}}.Name():{{dir[0]}}, {%- endfor%} }