MCPcopy Index your code
hub / github.com/cloudfoundry/cli / RunPlugin

Function RunPlugin

util/plugin/plugin.go:67–79  ·  view source on GitHub ↗
(plugin configv3.Plugin)

Source from the content-addressed store, hash-verified

65}
66
67func RunPlugin(plugin configv3.Plugin) error {
68 _, commandUI, err := getCFConfigAndCommandUIObjects()
69 if err != nil {
70 fmt.Fprintf(os.Stderr, "%s\n", err.Error())
71 return err
72 }
73 defer commandUI.FlushDeferred()
74 pluginErr := plugin_transition.RunPlugin(plugin, commandUI)
75 if pluginErr != nil {
76 return handleError(pluginErr, commandUI)
77 }
78 return nil
79}
80
81func getCFConfigAndCommandUIObjects() (*configv3.Config, *ui.UI, error) {
82 cfConfig, configErr := configv3.LoadConfig(configv3.FlagOverride{

Callers

nothing calls this directly

Calls 4

handleErrorFunction · 0.70
ErrorMethod · 0.65
FlushDeferredMethod · 0.65

Tested by

no test coverage detected