getStructCodec returns the structCodec for the given struct type.
(t reflect.Type)
| 166 | |
| 167 | // getStructCodec returns the structCodec for the given struct type. |
| 168 | func getStructCodec(t reflect.Type) (*structCodec, error) { |
| 169 | structCodecsMutex.Lock() |
| 170 | defer structCodecsMutex.Unlock() |
| 171 | return getStructCodecLocked(t) |
| 172 | } |
| 173 | |
| 174 | // getStructCodecLocked implements getStructCodec. The structCodecsMutex must |
| 175 | // be held when calling this function. |
searching dependent graphs…