show help when running goctl rpc protoc without any flags (#1683)

master
fang duan 3 years ago committed by GitHub
parent ff6c6558dd
commit 97bf3856c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,6 +23,10 @@ var (
// ZRPC generates grpc code directly by protoc and generates
// zrpc code by goctl.
func ZRPC(c *cli.Context) error {
if c.NumFlags() == 0 {
cli.ShowCommandHelpAndExit(c, "protoc", 1)
}
args := c.Parent().Args()
protocArgs := removeGoctlFlag(args)
pwd, err := os.Getwd()

Loading…
Cancel
Save