|
|
@ -198,12 +198,17 @@ func buildMethodDesc(g *protogen.GeneratedFile, m *protogen.Method, method, path |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
comment := m.Comments.Leading.String() + m.Comments.Trailing.String() |
|
|
|
|
|
|
|
if comment != "" { |
|
|
|
|
|
|
|
comment = "// " + m.GoName + strings.TrimPrefix(strings.TrimSuffix(comment, "\n"), "//") |
|
|
|
|
|
|
|
} |
|
|
|
return &methodDesc{ |
|
|
|
return &methodDesc{ |
|
|
|
Name: m.GoName, |
|
|
|
Name: m.GoName, |
|
|
|
OriginalName: string(m.Desc.Name()), |
|
|
|
OriginalName: string(m.Desc.Name()), |
|
|
|
Num: methodSets[m.GoName], |
|
|
|
Num: methodSets[m.GoName], |
|
|
|
Request: g.QualifiedGoIdent(m.Input.GoIdent), |
|
|
|
Request: g.QualifiedGoIdent(m.Input.GoIdent), |
|
|
|
Reply: g.QualifiedGoIdent(m.Output.GoIdent), |
|
|
|
Reply: g.QualifiedGoIdent(m.Output.GoIdent), |
|
|
|
|
|
|
|
Comment: comment, |
|
|
|
Path: path, |
|
|
|
Path: path, |
|
|
|
Method: method, |
|
|
|
Method: method, |
|
|
|
HasVars: len(vars) > 0, |
|
|
|
HasVars: len(vars) > 0, |
|
|
|