MCPcopy
hub / github.com/helm/helm / loadFile

Function loadFile

pkg/cmd/load_plugins.go:321–330  ·  view source on GitHub ↗

loadFile takes a yaml file at the given path, parses it and returns a pluginCommand object

(path string)

Source from the content-addressed store, hash-verified

319
320// loadFile takes a yaml file at the given path, parses it and returns a pluginCommand object
321func loadFile(path string) (*pluginCommand, error) {
322 cmds := new(pluginCommand)
323 b, err := os.ReadFile(path)
324 if err != nil {
325 return cmds, fmt.Errorf("file (%s) not provided by plugin. No plugin auto-completion possible", path)
326 }
327
328 err = yaml.Unmarshal(b, cmds)
329 return cmds, err
330}
331
332// pluginDynamicComp call the plugin.complete script of the plugin (if available)
333// to obtain the dynamic completion choices. It must pass all the flags and sub-commands

Callers 1

loadCompletionForPluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…