ReadBool reads a bool and sets error on bounds violation
(err *Error)
| 299 | |
| 300 | // ReadBool reads a bool and sets error on bounds violation |
| 301 | func (b *ByteBuffer) ReadBool(err *Error) bool { |
| 302 | if b.readerIndex+1 > len(b.data) { |
| 303 | if !b.fill(1, err) { |
| 304 | return false |
| 305 | } |
| 306 | } |
| 307 | v := b.data[b.readerIndex] |
| 308 | b.readerIndex++ |
| 309 | return v != 0 |
| 310 | } |
| 311 | |
| 312 | // ReadByte reads a byte and sets error on bounds violation |
| 313 | func (b *ByteBuffer) ReadByte(err *Error) byte { |
no test coverage detected