ReadCollectionLength reads a length value for collections.
()
| 252 | |
| 253 | // ReadCollectionLength reads a length value for collections. |
| 254 | func (c *ReadContext) ReadCollectionLength() int { |
| 255 | err := c.Err() |
| 256 | length := c.buffer.ReadLength(err) |
| 257 | if c.err.HasError() { |
| 258 | return 0 |
| 259 | } |
| 260 | return length |
| 261 | } |
| 262 | |
| 263 | // ReadBinaryLength reads a byte length value for binary data. |
| 264 | func (c *ReadContext) ReadBinaryLength() int { |