(name string, sf *structField)
| 154 | } |
| 155 | |
| 156 | func (s *structData) trySet(name string, sf *structField) { |
| 157 | if _, ok := s.fields[name]; ok { |
| 158 | return |
| 159 | } |
| 160 | sf = &structField{ |
| 161 | Nature: sf.Nature, |
| 162 | Index: append(s.curChildIndex, sf.Index...), |
| 163 | } |
| 164 | s.fields[name] = sf |
| 165 | if s.curParent != nil { |
| 166 | s.curParent.trySet(name, sf) |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func StructFields(c *Cache, t reflect.Type) map[string]Nature { |
| 171 | table := make(map[string]Nature) |
no outgoing calls
no test coverage detected