Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ func (m *Marshaler) newFieldIndex() int {
return fsLen
}

// AppendRaw appends marshalled protobuf message to mm.
func (mm *MessageMarshaler) AppendRaw(data []byte) {
m := mm.m
dst := m.buf
dstLen := len(dst)
dst = append(dst, data...)
m.buf = dst
mm.appendField(m, dstLen, len(dst))
}

// AppendInt32 appends the given int32 value under the given fieldNum to mm.
func (mm *MessageMarshaler) AppendInt32(fieldNum uint32, i32 int32) {
mm.AppendUint64(fieldNum, uint64(uint32(i32)))
Expand Down