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

Function newPodsCmd

cmd/reset/pods.go:27–53  ·  view source on GitHub ↗
(f factory.Factory, globalFlags *flags.GlobalFlags)

Source from the content-addressed store, hash-verified

25}
26
27func newPodsCmd(f factory.Factory, globalFlags *flags.GlobalFlags) *cobra.Command {
28 cmd := &podsCmd{
29 GlobalFlags: globalFlags,
30 log: log.GetInstance(),
31 }
32
33 podsCmd := &cobra.Command{
34 Use: "pods",
35 Short: "Resets the replaced pods",
36 Long: `
37#######################################################
38############### devspace reset pods ###################
39#######################################################
40Resets the replaced pods to its original state
41
42Examples:
43devspace reset pods
44#######################################################
45 `,
46 Args: cobra.NoArgs,
47 RunE: func(cobraCmd *cobra.Command, args []string) error {
48 return cmd.RunResetPods(f, cobraCmd, args)
49 }}
50
51 podsCmd.Flags().BoolVar(&cmd.Force, "force", false, "If true will force resetting pods even though they might be still used by other DevSpace projects")
52 return podsCmd
53}
54
55// RunResetPods executes the reset pods command logic
56func (cmd *podsCmd) RunResetPods(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewResetCmdFunction · 0.85

Calls 2

RunResetPodsMethod · 0.95
GetInstanceFunction · 0.92

Tested by

no test coverage detected