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

Function newContextCmd

cmd/remove/context.go:17–39  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

15}
16
17func newContextCmd(f factory.Factory) *cobra.Command {
18 cmd := &contextCmd{}
19
20 contextCmd := &cobra.Command{
21 Use: "context",
22 Short: "Removes a kubectl-context",
23 Long: `
24#######################################################
25############# devspace remove context #################
26#######################################################
27Removes a kubectl-context
28
29Example:
30devspace remove context myspace
31#######################################################
32 `,
33 Args: cobra.MaximumNArgs(1),
34 RunE: func(cobraCmd *cobra.Command, args []string) error {
35 return cmd.RunRemoveContext(f, cobraCmd, args)
36 }}
37
38 return contextCmd
39}
40
41// RunRemoveContext executes the devspace remove context functionality
42func (cmd *contextCmd) RunRemoveContext(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewRemoveCmdFunction · 0.70

Calls 1

RunRemoveContextMethod · 0.95

Tested by

no test coverage detected