From 820a0af71cf684b63c72f0a0b567c35235967b10 Mon Sep 17 00:00:00 2001 From: Austin Roberts Date: Tue, 31 Aug 2021 15:41:27 -0500 Subject: [PATCH] Pass plugin loader by interface --- go.mod | 2 +- plugins/plugin_loader.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5c7cc6070..1287f8905 100644 --- a/go.mod +++ b/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 diff --git a/plugins/plugin_loader.go b/plugins/plugin_loader.go index a9cfb87e1..932460300 100644 --- a/plugins/plugin_loader.go +++ b/plugins/plugin_loader.go @@ -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) } }