1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

Fix buildMethodDesc for two and more message field (#1979)

This commit is contained in:
Nikita Krasnikov 2022-05-16 08:37:36 +03:00 committed by GitHub
parent ddc82ce45e
commit ed144f6813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,9 +163,10 @@ func buildMethodDesc(g *protogen.GeneratedFile, m *protogen.Method, method, path
defer func() { methodSets[m.GoName]++ }()
vars := buildPathVars(path)
fields := m.Input.Desc.Fields()
for v, s := range vars {
fields := m.Input.Desc.Fields()
if s != nil {
path = replacePath(v, *s, path)
}