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

Method MarshalTo

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

Source from the content-addressed store, hash-verified

746}
747
748func (m *StringNodePb) MarshalTo(data []byte) (int, error) {
749 var i int
750 _ = i
751 var l int
752 _ = l
753 if m.Noquote != nil {
754 data[i] = 0x8
755 i++
756 if *m.Noquote {
757 data[i] = 1
758 } else {
759 data[i] = 0
760 }
761 i++
762 }
763 if m.Quote != nil {
764 data[i] = 0x10
765 i++
766 i = encodeVarintNode(data, i, uint64(*m.Quote))
767 }
768 data[i] = 0x1a
769 i++
770 i = encodeVarintNode(data, i, uint64(len(m.Text)))
771 i += copy(data[i:], m.Text)
772 if m.XXX_unrecognized != nil {
773 i += copy(data[i:], m.XXX_unrecognized)
774 }
775 return i, nil
776}
777
778func (m *IdentityNodePb) Marshal() (data []byte, err error) {
779 size := m.Size()

Callers 1

MarshalMethod · 0.95

Calls 1

encodeVarintNodeFunction · 0.85

Tested by

no test coverage detected