Pass plugin loader by interface

This commit is contained in:
Austin Roberts
2021-08-31 15:41:27 -05:00
parent d9d51dd345
commit 820a0af71c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -113,11 +113,11 @@ func Initialize(target string, ctx *cli.Context) (err error) {
func (pl *PluginLoader) Initialize(ctx *cli.Context) {
fns := pl.Lookup("Initialize", func(i interface{}) bool {
_, ok := i.(func(*cli.Context, *PluginLoader))
_, ok := i.(func(*cli.Context, core.PluginLoader))
return ok
})
for _, fni := range fns {
if fn, ok := fni.(func(*cli.Context, *PluginLoader)); ok {
if fn, ok := fni.(func(*cli.Context, core.PluginLoader)); ok {
fn(ctx, pl)
}
}