(f factory.Factory)
| 15 | } |
| 16 | |
| 17 | func 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 | ####################################################### |
| 27 | Removes a kubectl-context |
| 28 | |
| 29 | Example: |
| 30 | devspace 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 |
| 42 | func (cmd *contextCmd) RunRemoveContext(f factory.Factory, cobraCmd *cobra.Command, args []string) error { |
no test coverage detected