Add verbose flag (#1696)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
"github.com/zeromicro/go-zero/tools/goctl/completion"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/docker"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/env"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/internal/errorx"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/internal/version"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/kube"
|
||||
"github.com/zeromicro/go-zero/tools/goctl/migrate"
|
||||
@@ -70,6 +69,10 @@ var commands = []cli.Command{
|
||||
Name: "force, f",
|
||||
Usage: "silent installation of non-existent dependencies",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "verbose, v",
|
||||
Usage: "enable log output",
|
||||
},
|
||||
},
|
||||
Action: env.Check,
|
||||
},
|
||||
@@ -519,6 +522,10 @@ var commands = []cli.Command{
|
||||
Name: "branch",
|
||||
Usage: "the branch of the remote repo, it does work with --remote",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "verbose, v",
|
||||
Usage: "enable log output",
|
||||
},
|
||||
},
|
||||
Action: rpc.RPCNew,
|
||||
},
|
||||
@@ -601,6 +608,10 @@ var commands = []cli.Command{
|
||||
Name: "branch",
|
||||
Usage: "the branch of the remote repo, it does work with --remote",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "verbose, v",
|
||||
Usage: "enable log output",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -894,7 +905,7 @@ func main() {
|
||||
|
||||
// cli already print error messages.
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
fmt.Println(aurora.Red(errorx.Wrap(err).Error()))
|
||||
fmt.Println(aurora.Red(err.Error()))
|
||||
os.Exit(codeFailure)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user