(typ reflect.Type, tag string)
| 75 | } |
| 76 | |
| 77 | func (m *structCache) Fields(typ reflect.Type, tag string) *fields { |
| 78 | key := structCacheKey{tag: tag, typ: typ} |
| 79 | |
| 80 | if v, ok := m.m.Load(key); ok { |
| 81 | return v.(*fields) |
| 82 | } |
| 83 | |
| 84 | fs := getFields(typ, tag) |
| 85 | m.m.Store(key, fs) |
| 86 | |
| 87 | return fs |
| 88 | } |
| 89 | |
| 90 | //------------------------------------------------------------------------------ |
| 91 |
no test coverage detected