forked from p93542168/wheat-cache
fix(middle-template): update middle template
This commit is contained in:
parent
63bd44da44
commit
166d1f20c1
|
@ -12,9 +12,11 @@ import (
|
||||||
|
|
||||||
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
||||||
|
|
||||||
|
logMiddle := logMiddle.NewMiddleware()
|
||||||
|
mapKey := mapKey.NewMiddleware()
|
||||||
return map[string]plugins.MiddleToolsInterface{
|
return map[string]plugins.MiddleToolsInterface{
|
||||||
|
|
||||||
"logMiddle": logMiddle.NewMiddleware(),
|
logMiddle.Name(): logMiddle,
|
||||||
"mapKey": mapKey.NewMiddleware(),
|
mapKey.Name(): mapKey,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,12 @@ import (
|
||||||
|
|
||||||
|
|
||||||
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
||||||
|
{%for dir in dirs %}
|
||||||
|
{{dir[0]}}:={{dir[0]}}.NewMiddleware()
|
||||||
|
{%- endfor%}
|
||||||
return map[string]plugins.MiddleToolsInterface{
|
return map[string]plugins.MiddleToolsInterface{
|
||||||
{%for dir in dirs %}
|
{%for dir in dirs %}
|
||||||
"{{dir[0]}}":{{dir[0]}}.NewMiddleware(),
|
{{dir[0]}}.Name():{{dir[0]}},
|
||||||
{%- endfor%}
|
{%- endfor%}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue