EncodeMessage appends a length-prefixed encoded message to the buffer.
(m Message)
| 179 | |
| 180 | // EncodeMessage appends a length-prefixed encoded message to the buffer. |
| 181 | func (b *Buffer) EncodeMessage(m Message) error { |
| 182 | var err error |
| 183 | b.buf = protowire.AppendVarint(b.buf, uint64(Size(m))) |
| 184 | b.buf, err = marshalAppend(b.buf, m, b.deterministic) |
| 185 | return err |
| 186 | } |
| 187 | |
| 188 | // DecodeVarint consumes an encoded unsigned varint from the buffer. |
| 189 | func (b *Buffer) DecodeVarint() (uint64, error) { |
nothing calls this directly
no test coverage detected