Pass plugin loader by interface
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user