ReadBytes reads the value pointed by the decoder as bytes. Returns an error if the database is malformed or if the pointed value is not bytes.
()
| 78 | // |
| 79 | // Returns an error if the database is malformed or if the pointed value is not bytes. |
| 80 | func (d *Decoder) ReadBytes() ([]byte, error) { |
| 81 | val, err := d.readBytes(KindBytes) |
| 82 | if err != nil { |
| 83 | return nil, d.wrapError(err) |
| 84 | } |
| 85 | return val, nil |
| 86 | } |
| 87 | |
| 88 | // ReadFloat32 reads the value pointed by the decoder as a float32. |
| 89 | // |