MCPcopy Create free account
hub / github.com/araddon/qlbridge / MarshalTo

Method MarshalTo

expr/node.pb.go:708–736  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

706}
707
708func (m *ArrayNodePb) MarshalTo(data []byte) (int, error) {
709 var i int
710 _ = i
711 var l int
712 _ = l
713 if m.Wrap == nil {
714 return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError)
715 } else {
716 data[i] = 0x8
717 i++
718 i = encodeVarintNode(data, i, uint64(*m.Wrap))
719 }
720 if len(m.Args) > 0 {
721 for _, msg := range m.Args {
722 data[i] = 0x1a
723 i++
724 i = encodeVarintNode(data, i, uint64(msg.Size()))
725 n, err := msg.MarshalTo(data[i:])
726 if err != nil {
727 return 0, err
728 }
729 i += n
730 }
731 }
732 if m.XXX_unrecognized != nil {
733 i += copy(data[i:], m.XXX_unrecognized)
734 }
735 return i, nil
736}
737
738func (m *StringNodePb) Marshal() (data []byte, err error) {
739 size := m.Size()

Callers 1

MarshalMethod · 0.95

Calls 3

encodeVarintNodeFunction · 0.85
SizeMethod · 0.45
MarshalToMethod · 0.45

Tested by

no test coverage detected