MCPcopy Create free account
hub / github.com/devspace-sh/devspace / NewCleanupCmd

Function NewCleanupCmd

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

NewCleanupCmd creates a new cobra command

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

Source from the content-addressed store, hash-verified

9
10// NewCleanupCmd creates a new cobra command
11func NewCleanupCmd(f factory.Factory, globalFlags *flags.GlobalFlags, plugins []plugin.Metadata) *cobra.Command {
12 cleanupCmd := &cobra.Command{
13 Use: "cleanup",
14 Short: "Cleans up resources",
15 Long: `
16#######################################################
17################## devspace cleanup ###################
18#######################################################
19 `,
20 Args: cobra.NoArgs,
21 }
22
23 cleanupCmd.AddCommand(newImagesCmd(f, globalFlags))
24 cleanupCmd.AddCommand(newLocalRegistryCmd(f, globalFlags))
25
26 // Add plugin commands
27 plugin.AddPluginCommands(cleanupCmd, plugins, "cleanup")
28 return cleanupCmd
29}

Callers 1

BuildRootFunction · 0.92

Calls 3

AddPluginCommandsFunction · 0.92
newImagesCmdFunction · 0.85
newLocalRegistryCmdFunction · 0.85

Tested by

no test coverage detected