plugin: fix plugin loading

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 b135a1fa
......@@ -56,11 +56,12 @@ func loadPlugin(fi string) ([]iplugin.Plugin, error) {
if err != nil {
return nil, err
}
log.Errorf("plugins: %T", pls)
typePls, ok := pls.([]iplugin.Plugin)
typePls, ok := pls.(*[]iplugin.Plugin)
if !ok {
return nil, errors.New("filed 'Plugins' didn't contain correct type")
}
return typePls, nil
return *typePls, nil
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论