github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/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  // DestroyCmd destroys generated code
     9  var DestroyCmd = &cobra.Command{
    10  	Use:     "destroy",
    11  	Short:   "Destroy generated components",
    12  	Aliases: []string{"d"},
    13  }
    14  
    15  func init() {
    16  	DestroyCmd.AddCommand(destroy.ResourceCmd)
    17  	DestroyCmd.AddCommand(destroy.ActionCmd)
    18  	DestroyCmd.AddCommand(destroy.MailerCmd)
    19  
    20  	DestroyCmd.PersistentFlags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand")
    21  
    22  	decorate("destroy", DestroyCmd)
    23  	RootCmd.AddCommand(DestroyCmd)
    24  }