(expected TypeId)
| 151 | } |
| 152 | |
| 153 | func (c *ReadContext) readExpectedTypeID(expected TypeId) bool { |
| 154 | actual := TypeId(c.buffer.ReadUint8(c.Err())) |
| 155 | if c.HasError() { |
| 156 | return false |
| 157 | } |
| 158 | if actual != expected { |
| 159 | c.SetError(TypeMismatchError(actual, expected)) |
| 160 | return false |
| 161 | } |
| 162 | return true |
| 163 | } |
| 164 | |
| 165 | // Inline primitive reads |
| 166 | func (c *ReadContext) RawBool() bool { return c.buffer.ReadBool(c.Err()) } |
no test coverage detected