| 19 | ) |
| 20 | |
| 21 | type jsonEncoded struct { |
| 22 | // containerLength is only set if this is an object or an array. |
| 23 | containerLen int |
| 24 | typ Type |
| 25 | // value contains the encoding of this JSON value. In the case of |
| 26 | // arrays and objects, value contains the container header, but it never |
| 27 | // contains a scalar container header. |
| 28 | value []byte |
| 29 | |
| 30 | // TODO(justin): for simplicity right now we use a mutex, we could be using |
| 31 | // an atomic CAS though. |
| 32 | mu struct { |
| 33 | syncutil.RWMutex |
| 34 | |
| 35 | cachedDecoded JSON |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | const jsonEncodedSize = unsafe.Sizeof(jsonEncoded{}) |
| 40 |
nothing calls this directly
no outgoing calls
no test coverage detected