Commit 241a0a12 authored by 谢宇轩's avatar 谢宇轩

fix: 优化参数加载方式

parent f83b9639
...@@ -24,6 +24,10 @@ func getRegistedPlugins() map[string]HandlerConstruct { ...@@ -24,6 +24,10 @@ func getRegistedPlugins() map[string]HandlerConstruct {
} }
// 加载当前注册过的插件 // 加载当前注册过的插件
func LoadRegistedPlugins(plugin string) Handler { func LoadRegistedPlugins(plugin string) (Handler, bool) {
return getRegistedPlugins()[plugin]() h, ok := getRegistedPlugins()[plugin]
} if ok {
\ No newline at end of file return h(), ok
}
return nil, false
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment