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

Method MarshalTo

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

Source from the content-addressed store, hash-verified

633}
634
635func (m *FuncNodePb) MarshalTo(data []byte) (int, error) {
636 var i int
637 _ = i
638 var l int
639 _ = l
640 data[i] = 0xa
641 i++
642 i = encodeVarintNode(data, i, uint64(len(m.Name)))
643 i += copy(data[i:], m.Name)
644 if len(m.Args) > 0 {
645 for _, msg := range m.Args {
646 data[i] = 0x12
647 i++
648 i = encodeVarintNode(data, i, uint64(msg.Size()))
649 n, err := msg.MarshalTo(data[i:])
650 if err != nil {
651 return 0, err
652 }
653 i += n
654 }
655 }
656 if m.XXX_unrecognized != nil {
657 i += copy(data[i:], m.XXX_unrecognized)
658 }
659 return i, nil
660}
661
662func (m *TriNodePb) Marshal() (data []byte, err error) {
663 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