github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/buffalo/cmd/fix.go (about) 1 package cmd 2 3 import ( 4 "fmt" 5 6 "github.com/gobuffalo/buffalo/buffalo/cmd/fix" 7 "github.com/gobuffalo/buffalo/runtime" 8 "github.com/spf13/cobra" 9 ) 10 11 // fixCmd represents the info command 12 var fixCmd = &cobra.Command{ 13 Use: "fix", 14 Aliases: []string{"update"}, 15 Short: fmt.Sprintf("Attempt to fix a Buffalo application's API to match version %s", runtime.Version), 16 RunE: func(cmd *cobra.Command, args []string) error { 17 return fix.Run() 18 }, 19 } 20 21 func init() { 22 decorate("fix", RootCmd) 23 decorate("update", RootCmd) 24 25 fixCmd.Flags().BoolVarP(&fix.YesToAll, "y", "y", false, "update all without asking for confirmation") 26 RootCmd.AddCommand(fixCmd) 27 }