mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
plugin: fix plugin loading
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
b135a1fa86
commit
6da6e7756e
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user