(f factory.Factory)
| 14 | type contextsCmd struct{} |
| 15 | |
| 16 | func 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 | ####################################################### |
| 26 | Lists all available kube contexts |
| 27 | |
| 28 | Example: |
| 29 | devspace 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" |
| 41 | func (cmd *contextsCmd) RunListContexts(f factory.Factory, cobraCmd *cobra.Command, args []string) error { |
no test coverage detected