Use defined interface for cast
This commit is contained in:
parent
a8ef49b4fe
commit
609930c8bf
@ -73,9 +73,7 @@ func (cc *componentCreator) Create(
|
||||
scope interface{},
|
||||
pluginName string,
|
||||
) (*Component, error) {
|
||||
s, ok := scope.(interface {
|
||||
startPlugin(context.Context, component.Type, string) (*plugin.Instance, error)
|
||||
})
|
||||
s, ok := scope.(pluginer)
|
||||
if !ok {
|
||||
panic("the scope provided is invalid")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user