RedactableBytes returns the bytes in the buffer.
()
| 59 | |
| 60 | // RedactableBytes returns the bytes in the buffer. |
| 61 | func (b Buffer) RedactableBytes() m.RedactableBytes { |
| 62 | // NB: we're dependent on the fact this is a copy of the original |
| 63 | // buffer. The finalize() method should not be called |
| 64 | // in a conceputally read-only accessor like RedactableBytes(). |
| 65 | b.finalize() |
| 66 | return m.RedactableBytes(b.buf) |
| 67 | } |
| 68 | |
| 69 | // RedactableString returns the bytes in the buffer. |
| 70 | func (b Buffer) RedactableString() m.RedactableString { |