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

Function NewAddCmd

cmd/add/add.go:11–29  ·  view source on GitHub ↗

NewAddCmd creates a new cobra command

(f factory.Factory, globalFlags *flags.GlobalFlags, plugins []plugin.Metadata)

Source from the content-addressed store, hash-verified

9
10// NewAddCmd creates a new cobra command
11func NewAddCmd(f factory.Factory, globalFlags *flags.GlobalFlags, plugins []plugin.Metadata) *cobra.Command {
12 addCmd := &cobra.Command{
13 Use: "add",
14 Short: "Adds something to devspace.yaml",
15 Long: `
16#######################################################
17#################### devspace add #####################
18#######################################################
19Adds config sections to devspace.yaml
20 `,
21 Args: cobra.NoArgs,
22 }
23
24 addCmd.AddCommand(newPluginCmd(f))
25
26 // Add plugin commands
27 plugin.AddPluginCommands(addCmd, plugins, "add")
28 return addCmd
29}

Callers 1

BuildRootFunction · 0.92

Calls 2

AddPluginCommandsFunction · 0.92
newPluginCmdFunction · 0.70

Tested by

no test coverage detected