plugin: fix plugin loading

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2017-07-13 23:02:13 +02:00
parent b135a1fa86
commit 6da6e7756e
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -56,11 +56,12 @@ func loadPlugin(fi string) ([]iplugin.Plugin, error) {
if err != nil {
return nil, err
}
log.Errorf("plugins: %T", pls)
typePls, ok := pls.([]iplugin.Plugin)
typePls, ok := pls.(*[]iplugin.Plugin)
if !ok {
return nil, errors.New("filed 'Plugins' didn't contain correct type")
}
return typePls, nil
return *typePls, nil
}