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 {
|
||||
|
||||
logMiddle := logMiddle.NewMiddleware()
|
||||
mapKey := mapKey.NewMiddleware()
|
||||
return map[string]plugins.MiddleToolsInterface{
|
||||
|
||||
"logMiddle": logMiddle.NewMiddleware(),
|
||||
"mapKey": mapKey.NewMiddleware(),
|
||||
logMiddle.Name(): logMiddle,
|
||||
mapKey.Name(): mapKey,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,10 +12,12 @@ import (
|
|||
|
||||
|
||||
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
||||
|
||||
{%for dir in dirs %}
|
||||
{{dir[0]}}:={{dir[0]}}.NewMiddleware()
|
||||
{%- endfor%}
|
||||
return map[string]plugins.MiddleToolsInterface{
|
||||
{%for dir in dirs %}
|
||||
"{{dir[0]}}":{{dir[0]}}.NewMiddleware(),
|
||||
{{dir[0]}}.Name():{{dir[0]}},
|
||||
{%- endfor%}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue