github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/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:              "Run 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  }