github.com/jacobsoderblom/buffalo@v0.11.0/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 destroyCmd.AddCommand(destroy.ModelCmd) 18 19 destroyCmd.PersistentFlags().BoolVarP(&destroy.YesToAll, "yes", "y", false, "confirms all beforehand") 20 21 decorate("destroy", destroyCmd) 22 RootCmd.AddCommand(destroyCmd) 23 }