(f factory.Factory, globalFlags *flags.GlobalFlags)
| 20 | } |
| 21 | |
| 22 | func 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 | ####################################################### |
| 32 | Lists 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 |
| 45 | func (cmd *namespacesCmd) RunListNamespaces(f factory.Factory, cobraCmd *cobra.Command, args []string) error { |
no test coverage detected