netmaker/cli/cmd/context/delete.go
2022-11-28 18:16:56 +05:30

21 lines
423 B
Go

package context
import (
"github.com/gravitl/netmaker/cli/config"
"github.com/spf13/cobra"
)
// contextDeleteCmd deletes a contex
var contextDeleteCmd = &cobra.Command{
Use: "delete [NAME]",
Args: cobra.ExactArgs(1),
Short: "Delete a context",
Long: `Delete a context`,
Run: func(cmd *cobra.Command, args []string) {
config.DeleteContext(args[0])
},
}
func init() {
rootCmd.AddCommand(contextDeleteCmd)
}