delete.go 414 B

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