Merge pull request #64 from moul/dev/moul/fix-urls-vars-from-message
Make urlHasVarsFromMessage consistent with getMessageType
This commit is contained in:
commit
098b247649
@ -1,6 +1,6 @@
|
||||
{
|
||||
"build-date": "2017-05-02T11:50:25.063291628+02:00",
|
||||
"build-hostname": "manfred-spacegray.local",
|
||||
"build-date": "2017-05-19T20:09:45.954357761+02:00",
|
||||
"build-hostname": "manfred-spacegray.aircard",
|
||||
"build-user": "moul",
|
||||
"pwd": "/Users/moul/Git/moul/protoc-gen-gotemplate/examples/dummy",
|
||||
"debug": false,
|
||||
@ -839,5 +839,6 @@
|
||||
"options": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"enum": null
|
||||
}
|
@ -4,18 +4,18 @@
|
||||
<loc>/posts</loc>
|
||||
<priority>0.5</priority>
|
||||
<changefreq>monthly</changefreq>
|
||||
<lastmod>2017-03-31</lastmod>
|
||||
<lastmod>2017-05-19</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>/authors</loc>
|
||||
<priority>0.5</priority>
|
||||
<changefreq>monthly</changefreq>
|
||||
<lastmod>2017-03-31</lastmod>
|
||||
<lastmod>2017-05-19</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>/comments</loc>
|
||||
<priority>0.5</priority>
|
||||
<changefreq>monthly</changefreq>
|
||||
<lastmod>2017-03-31</lastmod>
|
||||
<lastmod>2017-05-19</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
|
@ -338,7 +338,7 @@ func httpVerb(m *descriptor.MethodDescriptorProto) string {
|
||||
}
|
||||
}
|
||||
|
||||
func urlHasVarsFromMessage(path string, d *descriptor.DescriptorProto) bool {
|
||||
func urlHasVarsFromMessage(path string, d *ggdescriptor.Message) bool {
|
||||
for _, field := range d.Field {
|
||||
if !isFieldMessage(field) {
|
||||
if strings.Contains(path, fmt.Sprintf("{%s}", *field.Name)) {
|
||||
|
Loading…
Reference in New Issue
Block a user