forked from cerc-io/plugeth
Pass plugin loader by interface
This commit is contained in:
parent
d9d51dd345
commit
820a0af71c
2
go.mod
2
go.mod
@ -49,7 +49,7 @@ require (
|
||||
github.com/naoina/go-stringutil v0.1.0 // indirect
|
||||
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/openrelayxyz/plugeth-utils v0.0.0
|
||||
github.com/openrelayxyz/plugeth-utils v0.0.1
|
||||
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7
|
||||
github.com/prometheus/tsdb v0.7.1
|
||||
github.com/rjeczalik/notify v0.9.1
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user