1234567891011121314151617181920212223 |
- package cmd
- import (
- "github.com/spf13/cobra"
- "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/compare/testdata"
- "github.com/wuntsong-org/go-zero-plus/tools/goctlwt/util/console"
- )
- var rootCmd = &cobra.Command{
- Use: "compare",
- Short: "Compare the goctl commands generated results between urfave and cobra",
- Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
- Run: func(cmd *cobra.Command, args []string) {
- dir := args[0]
- testdata.MustRun(dir)
- },
- }
- func Execute() {
- if err := rootCmd.Execute(); err != nil {
- console.Error("%+v", err)
- }
- }
|