rpc generation fix (#184)
* reactor alert * optimize * add test case * update the target directory in case proto contains option * fix missing comments and format code
This commit is contained in:
@@ -20,7 +20,7 @@ func (g *defaultGenerator) GenPb(ctx DirContext, protoImportPath []string, proto
|
||||
cw.WriteString(" -I=" + base)
|
||||
cw.WriteString(" " + proto.Name)
|
||||
if strings.Contains(proto.GoPackage, "/") {
|
||||
cw.WriteString(" --go_out=plugins=grpc:" + ctx.GetInternal().Filename)
|
||||
cw.WriteString(" --go_out=plugins=grpc:" + ctx.GetMain().Filename)
|
||||
} else {
|
||||
cw.WriteString(" --go_out=plugins=grpc:" + dir.Filename)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user