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

fix: 优化参数加载方式

parent f83b9639
......@@ -24,6 +24,10 @@ func getRegistedPlugins() map[string]HandlerConstruct {
}
// 加载当前注册过的插件
func LoadRegistedPlugins(plugin string) Handler {
return getRegistedPlugins()[plugin]()
func LoadRegistedPlugins(plugin string) (Handler, bool) {
h, ok := getRegistedPlugins()[plugin]
if ok {
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