improve goctl rpc new (#1687)

This commit is contained in:
fang duan
2022-04-17 20:56:56 +08:00
committed by GitHub
parent 5d4e7c84ee
commit ff6c6558dd
2 changed files with 7 additions and 2 deletions

View File

@@ -14,6 +14,10 @@ import (
// RPCNew is to generate rpc greet service, this greet service can speed
// up your understanding of the zrpc service structure
func RPCNew(c *cli.Context) error {
if c.NArg() == 0 {
cli.ShowCommandHelpAndExit(c, "new", 1)
}
rpcname := c.Args().First()
ext := filepath.Ext(rpcname)
if len(ext) > 0 {