github.com/bscott/buffalo@v0.11.1/buffalo/cmd/task.go (about) 1 package cmd 2 3 import ( 4 grifts "github.com/markbates/grift/cmd" 5 "github.com/spf13/cobra" 6 ) 7 8 // task command is a forward to grift tasks 9 var taskCommand = &cobra.Command{ 10 Use: "task", 11 Aliases: []string{"t", "tasks"}, 12 Short: "Runs your grift tasks", 13 DisableFlagParsing: true, 14 RunE: func(c *cobra.Command, args []string) error { 15 return grifts.Run("buffalo task", args) 16 }, 17 PersistentPreRunE: func(cmd *cobra.Command, args []string) error { 18 return nil 19 }, 20 } 21 22 func init() { 23 decorate("task", taskCommand) 24 RootCmd.AddCommand(taskCommand) 25 }