(t reflect.Type)
| 148 | } |
| 149 | |
| 150 | func (c *Cache) getStruct(t reflect.Type) Nature { |
| 151 | if c.structs == nil { |
| 152 | c.structs = map[reflect.Type]Nature{} |
| 153 | } else if nt, ok := c.structs[t]; ok { |
| 154 | return nt |
| 155 | } |
| 156 | nt := Nature{ |
| 157 | Type: t, |
| 158 | Kind: reflect.Struct, |
| 159 | TypeData: &TypeData{ |
| 160 | structData: &structData{ |
| 161 | rType: t, |
| 162 | numField: t.NumField(), |
| 163 | anonIdx: -1, // do not lookup embedded fields yet |
| 164 | }, |
| 165 | }, |
| 166 | } |
| 167 | c.structs[t] = nt |
| 168 | return nt |
| 169 | } |
| 170 | |
| 171 | func (c *Cache) getMethodset(t reflect.Type, k reflect.Kind) *methodset { |
| 172 | if t == nil || c == nil { |
no outgoing calls
no test coverage detected