delete.go 386 B

1234567891011121314151617181920
  1. package context
  2. import (
  3. "github.com/gravitl/netmaker/cli/config"
  4. "github.com/spf13/cobra"
  5. )
  6. var contextDeleteCmd = &cobra.Command{
  7. Use: "delete [NAME]",
  8. Args: cobra.ExactArgs(1),
  9. Short: "Delete a context",
  10. Long: `Delete a context`,
  11. Run: func(cmd *cobra.Command, args []string) {
  12. config.DeleteContext(args[0])
  13. },
  14. }
  15. func init() {
  16. rootCmd.AddCommand(contextDeleteCmd)
  17. }