add more test (#189)
* new test * import bug when with quotation * new test * add test condition * rpc template command use -o param Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
@@ -59,9 +59,10 @@ func RpcNew(c *cli.Context) error {
|
||||
}
|
||||
|
||||
func RpcTemplate(c *cli.Context) error {
|
||||
name := c.Args().First()
|
||||
if len(name) == 0 {
|
||||
name = "greet.proto"
|
||||
protoFile := c.String("o")
|
||||
if len(protoFile) == 0 {
|
||||
return errors.New("missing -o")
|
||||
}
|
||||
return generator.ProtoTmpl(name)
|
||||
|
||||
return generator.ProtoTmpl(protoFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user