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

Function newNamespacesCmd

cmd/list/namespaces.go:22–42  ·  view source on GitHub ↗
(f factory.Factory, globalFlags *flags.GlobalFlags)

Source from the content-addressed store, hash-verified

20}
21
22func newNamespacesCmd(f factory.Factory, globalFlags *flags.GlobalFlags) *cobra.Command {
23 cmd := &namespacesCmd{GlobalFlags: globalFlags}
24
25 namespacesCmd := &cobra.Command{
26 Use: "namespaces",
27 Short: "Lists all namespaces in the current context",
28 Long: `
29#######################################################
30############ devspace list namespaces #################
31#######################################################
32Lists all namespaces in the selected kube context
33#######################################################
34 `,
35 // Args: cobra.NoArgs,
36 DisableFlagParsing: true,
37 RunE: func(cobraCmd *cobra.Command, args []string) error {
38 return cmd.RunListNamespaces(f, cobraCmd, args)
39 }}
40
41 return namespacesCmd
42}
43
44// RunListNamespaces runs the list namespaces command logic
45func (cmd *namespacesCmd) RunListNamespaces(f factory.Factory, cobraCmd *cobra.Command, args []string) error {

Callers 1

NewListCmdFunction · 0.85

Calls 1

RunListNamespacesMethod · 0.95

Tested by

no test coverage detected