Add --go_opt flag to adapt to the version after 1.4.0 of protoc-gen-go (#767)
Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
@@ -17,6 +17,7 @@ func RPC(c *cli.Context) error {
|
||||
out := c.String("dir")
|
||||
style := c.String("style")
|
||||
protoImportPath := c.StringSlice("proto_path")
|
||||
goOptions := c.StringSlice("go_opt")
|
||||
if len(src) == 0 {
|
||||
return errors.New("missing -src")
|
||||
}
|
||||
@@ -29,7 +30,7 @@ func RPC(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return g.Generate(src, out, protoImportPath)
|
||||
return g.Generate(src, out, protoImportPath, goOptions...)
|
||||
}
|
||||
|
||||
// RPCNew is to generate rpc greet service, this greet service can speed
|
||||
|
||||
Reference in New Issue
Block a user