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

Function newContextsCmd

cmd/list/contexts.go:16–38  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

14type contextsCmd struct{}
15
16func newContextsCmd(f factory.Factory) *cobra.Command {
17 cmd := &contextsCmd{}
18
19 contextsCmd := &cobra.Command{
20 Use: "contexts",
21 Short: "Lists all kube contexts",
22 Long: `
23#######################################################
24############## devspace list contexts #################
25#######################################################
26Lists all available kube contexts
27
28Example:
29devspace list contexts
30#######################################################
31 `,
32 Args: cobra.NoArgs,
33 RunE: func(cobraCmd *cobra.Command, args []string) error {
34 return cmd.RunListContexts(f, cobraCmd, args)
35 }}
36
37 return contextsCmd
38}
39
40// RunListContexts executes the functionality "devspace list contexts"
41func (cmd *contextsCmd) RunListContexts(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewListCmdFunction · 0.85

Calls 1

RunListContextsMethod · 0.95

Tested by

no test coverage detected