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

Function NewUseCmd

cmd/use/use.go:11–28  ·  view source on GitHub ↗

NewUseCmd creates a new cobra command for the use sub command

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

Source from the content-addressed store, hash-verified

9
10// NewUseCmd creates a new cobra command for the use sub command
11func NewUseCmd(f factory.Factory, globalFlags *flags.GlobalFlags, plugins []plugin.Metadata) *cobra.Command {
12 useCmd := &cobra.Command{
13 Use: "use",
14 Short: "Uses specific config",
15 Long: `
16#######################################################
17#################### devspace use #####################
18#######################################################
19 `,
20 Args: cobra.NoArgs,
21 }
22 useCmd.AddCommand(newContextCmd(f, globalFlags))
23 useCmd.AddCommand(newNamespaceCmd(f, globalFlags))
24
25 // Add plugin commands
26 plugin.AddPluginCommands(useCmd, plugins, "use")
27 return useCmd
28}

Callers 1

BuildRootFunction · 0.92

Calls 3

AddPluginCommandsFunction · 0.92
newNamespaceCmdFunction · 0.85
newContextCmdFunction · 0.70

Tested by

no test coverage detected