MCPcopy Index your code
hub / github.com/devspace-sh/devspace / newPluginCmd

Function newPluginCmd

cmd/add/plugin.go:13–35  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

11}
12
13func newPluginCmd(f factory.Factory) *cobra.Command {
14 cmd := &pluginCmd{}
15 pluginCmd := &cobra.Command{
16 Use: "plugin",
17 Short: "Adds a plugin to devspace",
18 Long: `
19#######################################################
20############### devspace add plugin ###################
21#######################################################
22Adds a new plugin to devspace
23
24devspace add plugin https://github.com/my-plugin/plugin
25#######################################################
26 `,
27 Args: cobra.ExactArgs(1),
28 RunE: func(cobraCmd *cobra.Command, args []string) error {
29 plugin.SetPluginCommand(cobraCmd, args)
30 return cmd.Run(f, args)
31 }}
32
33 pluginCmd.Flags().StringVar(&cmd.Version, "version", "", "The git tag to use")
34 return pluginCmd
35}
36
37// Run executes the command logic
38func (cmd *pluginCmd) Run(f factory.Factory, args []string) error {

Callers 1

NewAddCmdFunction · 0.70

Calls 2

RunMethod · 0.95
SetPluginCommandFunction · 0.92

Tested by

no test coverage detected