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

Method MarshalTo

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

Source from the content-addressed store, hash-verified

593}
594
595func (m *UnaryNodePb) MarshalTo(data []byte) (int, error) {
596 var i int
597 _ = i
598 var l int
599 _ = l
600 data[i] = 0x8
601 i++
602 i = encodeVarintNode(data, i, uint64(m.Op))
603 data[i] = 0x10
604 i++
605 if m.Paren {
606 data[i] = 1
607 } else {
608 data[i] = 0
609 }
610 i++
611 data[i] = 0x1a
612 i++
613 i = encodeVarintNode(data, i, uint64(m.Arg.Size()))
614 n14, err := m.Arg.MarshalTo(data[i:])
615 if err != nil {
616 return 0, err
617 }
618 i += n14
619 if m.XXX_unrecognized != nil {
620 i += copy(data[i:], m.XXX_unrecognized)
621 }
622 return i, nil
623}
624
625func (m *FuncNodePb) Marshal() (data []byte, err error) {
626 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