forked from p93542168/wheat-cache
chore(pluigin): init pluugins
This commit is contained in:
parent
5d7df024e4
commit
19562221f9
|
@ -12,8 +12,9 @@ import (
|
||||||
func GetMiddlewareMap() map[string]plugins.PluginInterface {
|
func GetMiddlewareMap() map[string]plugins.PluginInterface {
|
||||||
|
|
||||||
mockPlugin := mockPlugin.NewPlugin()
|
mockPlugin := mockPlugin.NewPlugin()
|
||||||
return map[string]plugins.PluginInterface{
|
mockPlugin.Init()
|
||||||
|
|
||||||
|
return map[string]plugins.PluginInterface{
|
||||||
mockPlugin.Name(): mockPlugin,
|
mockPlugin.Name(): mockPlugin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,10 @@ import (
|
||||||
func GetMiddlewareMap() map[string]plugins.PluginInterface {
|
func GetMiddlewareMap() map[string]plugins.PluginInterface {
|
||||||
{%for dir in dirs %}
|
{%for dir in dirs %}
|
||||||
{{dir[0]}}:={{dir[0]}}.NewPlugin()
|
{{dir[0]}}:={{dir[0]}}.NewPlugin()
|
||||||
{%- endfor%}
|
{{dir[0]}}.Init()
|
||||||
|
{% endfor%}
|
||||||
return map[string]plugins.PluginInterface{
|
return map[string]plugins.PluginInterface{
|
||||||
{%for dir in dirs %}
|
{%for dir in dirs -%}
|
||||||
{{dir[0]}}.Name():{{dir[0]}},
|
{{dir[0]}}.Name():{{dir[0]}},
|
||||||
{%- endfor%}
|
{%- endfor%}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue