Documentation ¶
Overview ¶
Package plugin provides functions to create new CLI plugins.
Index ¶
Constants ¶
View Source
const CmdTemplate = `` /* 1078-byte string literal not displayed */
CmdTemplate is the template for plugin commands.
Variables ¶
View Source
var UsageFunc = func(c *cobra.Command) error { t, err := template.New("usage").Funcs(cli.TemplateFuncs).Parse(CmdTemplate) if err != nil { return err } return t.Execute(os.Stdout, c) }
UsageFunc is the usage func for a plugin.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
Plugin is a Tanzu CLI plugin.
func NewPlugin ¶
func NewPlugin(descriptor *cliv1alpha1.PluginDescriptor) (*Plugin, error)
NewPlugin creates an instance of Plugin.
func NewPluginFromFile ¶
NewPluginFromFile create a new instance of Plugin from a file descriptor.
func (*Plugin) AddCommands ¶
AddCommands adds commands to the plugin.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.