tagName returns the field's tag value for the given binding source tag. Keep in sync with the tag fields above and the f.Tag.Get calls in bindMetaFor.
(tag string)
| 158 | // tagName returns the field's tag value for the given binding source tag. |
| 159 | // Keep in sync with the tag fields above and the f.Tag.Get calls in bindMetaFor. |
| 160 | func (m *bindFieldMeta) tagName(tag string) string { |
| 161 | switch tag { |
| 162 | case "param": |
| 163 | return m.param |
| 164 | case "query": |
| 165 | return m.query |
| 166 | case "form": |
| 167 | return m.form |
| 168 | case "header": |
| 169 | return m.header |
| 170 | default: |
| 171 | return "" |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // bindStructMeta is the cached field metadata for a whole struct type, in declaration order. |
| 176 | type bindStructMeta struct { |