package cmd import ( "gadmin/internal/generate" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) var generateSqlCmd = &cobra.Command{ Use: "gendbtable", Short: "根据model生成数据表", Long: `A longer description that spans multiple lines and likely contains examples and usage of using your command. For example: Cobra is a CLI library for Go that empowers applications. This application is a tool to generate the needed files to quickly create a Cobra application.`, Run: func(cmd *cobra.Command, args []string) { logrus.Info("generate sql called") generate.GenDbTable() }, } func init() { rootCmd.AddCommand(generateSqlCmd) }