test cobra

This commit is contained in:
wangchuxiao
2023-03-07 20:07:13 +08:00
parent f5309ee3b8
commit 320c978e94
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ func main() {
rootCmd := cmd.NewRootCmd()
rootCmd.AddPortFlag()
rootCmd.AddRunE(run)
if err := rootCmd.Command.Execute(); err != nil {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}