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

pull/1982/head
Nikita Krasnikov 3 years ago committed by GitHub
parent ddc82ce45e
commit ed144f6813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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]++ }()
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)
}

Loading…
Cancel
Save