!55 修改middle代码自动生成模板
Merge pull request !55 from Sodesnei/middle-template
This commit is contained in:
commit
1540651864
|
@ -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