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

Method MarshalTo

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

Source from the content-addressed store, hash-verified

517}
518
519func (m *BooleanNodePb) MarshalTo(data []byte) (int, error) {
520 var i int
521 _ = i
522 var l int
523 _ = l
524 data[i] = 0x8
525 i++
526 i = encodeVarintNode(data, i, uint64(m.Op))
527 if len(m.Args) > 0 {
528 for _, msg := range m.Args {
529 data[i] = 0x12
530 i++
531 i = encodeVarintNode(data, i, uint64(msg.Size()))
532 n, err := msg.MarshalTo(data[i:])
533 if err != nil {
534 return 0, err
535 }
536 i += n
537 }
538 }
539 if m.XXX_unrecognized != nil {
540 i += copy(data[i:], m.XXX_unrecognized)
541 }
542 return i, nil
543}
544
545func (m *IncludeNodePb) Marshal() (data []byte, err error) {
546 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