Unread returns the unread portion of the buffer.
()
| 102 | |
| 103 | // Unread returns the unread portion of the buffer. |
| 104 | func (b *Buffer) Unread() []byte { |
| 105 | return b.buf[b.idx:] |
| 106 | } |
| 107 | |
| 108 | // Marshal appends the wire-format encoding of m to the buffer. |
| 109 | func (b *Buffer) Marshal(m Message) error { |