You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
521 B
Go
24 lines
521 B
Go
3 years ago
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"github.com/spf13/cobra"
|
||
|
"github.com/zeromicro/go-zero/tools/goctl/compare/testdata"
|
||
|
"github.com/zeromicro/go-zero/tools/goctl/util/console"
|
||
|
)
|
||
|
|
||
|
var rootCmd = &cobra.Command{
|
||
|
Use: "compare",
|
||
|
Short: "Compare the goctl commands generated results between urfave and cobra",
|
||
|
Args: cobra.ExactValidArgs(1),
|
||
|
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)
|
||
|
}
|
||
|
}
|