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

status-code-override
Nikita Krasnikov 3 years ago committed by chenzhihui
parent 49a9572118
commit be9cfde7a4
  1. 3
      cmd/protoc-gen-go-http/http.go

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

Loading…
Cancel
Save