FindPlugins returns a list of plugins that match the descriptor Errors loading a plugin are ignored with a warning
(pluginsDirs []string, descriptor Descriptor)
| 208 | // FindPlugins returns a list of plugins that match the descriptor |
| 209 | // Errors loading a plugin are ignored with a warning |
| 210 | func FindPlugins(pluginsDirs []string, descriptor Descriptor) ([]Plugin, error) { |
| 211 | loadAllIgnoreErrors := func(pluginsDir string) ([]Plugin, error) { |
| 212 | return LoadAllDir(pluginsDir, LogIgnorePluginLoadErrorFilterFunc) |
| 213 | } |
| 214 | return findPlugins(pluginsDirs, loadAllIgnoreErrors, makeDescriptorFilter(descriptor)) |
| 215 | } |
| 216 | |
| 217 | // findPlugins is the internal implementation that uses the find and filter functions |
| 218 | func findPlugins(pluginsDirs []string, findFn findFunc, filterFn filterFunc) ([]Plugin, error) { |
no test coverage detected
searching dependent graphs…