MCPcopy Create free account
hub / github.com/helm/helm / FindPlugins

Function FindPlugins

internal/plugin/loader.go:210–215  ·  view source on GitHub ↗

FindPlugins returns a list of plugins that match the descriptor Errors loading a plugin are ignored with a warning

(pluginsDirs []string, descriptor Descriptor)

Source from the content-addressed store, hash-verified

208// FindPlugins returns a list of plugins that match the descriptor
209// Errors loading a plugin are ignored with a warning
210func 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
218func findPlugins(pluginsDirs []string, findFn findFunc, filterFn filterFunc) ([]Plugin, error) {

Callers 4

newPluginListCmdFunction · 0.92
compListPluginsFunction · 0.92
loadCLIPluginsFunction · 0.92
collectGetterPluginsFunction · 0.92

Calls 3

LoadAllDirFunction · 0.85
findPluginsFunction · 0.85
makeDescriptorFilterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…