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

Function main

plugin/plugin_examples/basic_plugin/basic_plugin.go:76–88  ·  view source on GitHub ↗

Unlike most Go programs, the `Main()` function will not be used to run all of the commands provided in your plugin. Main will be used to initialize the plugin process, as well as any dependencies you might require for your plugin.

()

Source from the content-addressed store, hash-verified

74// process, as well as any dependencies you might require for your
75// plugin.
76func main() {
77 // Any initialization for your plugin can be handled here
78 //
79 // Note: to run the plugin.Start method, we pass in a pointer to the struct
80 // implementing the interface defined at "code.cloudfoundry.org/cli/v8/plugin/plugin.go"
81 //
82 // Note: The plugin's main() method is invoked at install time to collect
83 // metadata. The plugin will exit 0 and the Run([]string) method will not be
84 // invoked.
85 plugin.Start(new(BasicPlugin))
86 // Plugin code should be written in the Run([]string) method,
87 // ensuring the plugin environment is bootstrapped.
88}

Callers

nothing calls this directly

Calls 1

StartFunction · 0.92

Tested by

no test coverage detected