github.com/mayra-cabrera/buffalo@v0.9.4-0.20170814145312-66d2e7772f11/buffalo/cmd/destroy.go (about)

     1  package cmd
     2  
     3  import (
     4  	"github.com/gobuffalo/buffalo/buffalo/cmd/destroy"
     5  	"github.com/spf13/cobra"
     6  )
     7  
     8  var destroyCmd = &cobra.Command{
     9  	Use:     "destroy",
    10  	Short:   "Allows to destroy generated code.",
    11  	Aliases: []string{"d"},
    12  }
    13  
    14  func init() {
    15  	destroyCmd.AddCommand(destroy.ResourceCmd)
    16  	destroyCmd.AddCommand(destroy.ActionCmd)
    17  
    18  	destroy.ResourceCmd.Flags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand")
    19  	destroy.ModelCmd.Flags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand")
    20  	destroy.ActionCmd.Flags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand")
    21  
    22  	decorate("destroy", destroyCmd)
    23  	RootCmd.AddCommand(destroyCmd)
    24  }