fix: replace goctl ExactValidArgs to MatchAll (#2759)

Co-authored-by: chenjieping <chenjieping@kezaihui.com>
This commit is contained in:
chensy
2023-01-07 17:07:40 +08:00
committed by GitHub
parent e52dace416
commit 8157e2118d
3 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ var (
newCmd = &cobra.Command{
Use: "new",
Short: "Generate rpc demo service",
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
RunE: cli.RPCNew,
}
@@ -34,7 +34,7 @@ var (
Use: "protoc",
Short: "Generate grpc code",
Example: "goctl rpc protoc xx.proto --go_out=./pb --go-grpc_out=./pb --zrpc_out=.",
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
RunE: cli.ZRPC,
}
)