gitlab.com/polyapp-open-source/poly@v0.0.0-20200304172929-90b164ae7520/cmd/auto.go (about) 1 package cmd 2 3 import ( 4 "fmt" 5 6 "github.com/spf13/cobra" 7 ) 8 9 // autoCmd represents the auto command 10 var autoCmd = &cobra.Command{ 11 Use: "auto", 12 Short: "A highly opinionated automatic Lint, test, build, run, integration and deployment tool", 13 Long: `This tool is stupid and incredibly opinionated. It runs indefinitely.`, 14 Run: func(cmd *cobra.Command, args []string) { 15 fmt.Println("auto called") 16 }, 17 } 18 19 func init() { 20 rootCmd.AddCommand(autoCmd) 21 22 // Cobra supports local flags which will only run when this command is called 23 // autoCmd.Flags().Int("issue", 0, "Given an Issue #, resolve the issue.") 24 }