(data []byte)
| 746 | } |
| 747 | |
| 748 | func (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 | |
| 778 | func (m *IdentityNodePb) Marshal() (data []byte, err error) { |
| 779 | size := m.Size() |
no test coverage detected