()
| 24 | } |
| 25 | |
| 26 | func (c *cachedReader) ReadByte() (b byte, err error) { |
| 27 | b, err = c.buffer.ReadByte() |
| 28 | if err != nil { |
| 29 | return |
| 30 | } |
| 31 | if c.caching { |
| 32 | c.cacheByte(b) |
| 33 | } |
| 34 | return |
| 35 | } |
| 36 | |
| 37 | func (c *cachedReader) Cache() []byte { |
| 38 | return c.cache |