(pl *payloadIface, rdser *Serializer, fieldsoutcnt []int, tag ctag)
| 65 | } |
| 66 | |
| 67 | func (dec *Decoder) skipStruct(pl *payloadIface, rdser *Serializer, fieldsoutcnt []int, tag ctag) bool { |
| 68 | ctagType := tag.Type() |
| 69 | |
| 70 | if ctagType == TAG_END { |
| 71 | return false |
| 72 | } |
| 73 | ctagField := tag.Field() |
| 74 | |
| 75 | //fmt.Printf("skipping '%s' %s\n", dec.state.tagsMatcher.tag2name(tag.Name()), tag.Dump()) |
| 76 | |
| 77 | if ctagField >= 0 { |
| 78 | cnt := &fieldsoutcnt[ctagField] |
| 79 | switch ctagType { |
| 80 | case TAG_ARRAY: |
| 81 | count := int(rdser.GetVarUInt()) |
| 82 | *cnt += count |
| 83 | default: |
| 84 | (*cnt)++ |
| 85 | } |
| 86 | } else { |
| 87 | switch ctagType { |
| 88 | case TAG_OBJECT: |
| 89 | for dec.skipStruct(pl, rdser, fieldsoutcnt, rdser.GetCTag()) { |
| 90 | } |
| 91 | case TAG_ARRAY: |
| 92 | atag := rdser.GetCArrayTag() |
| 93 | count := atag.Count() |
| 94 | subtag := atag.Tag() |
| 95 | for range count { |
| 96 | switch subtag { |
| 97 | case TAG_OBJECT: |
| 98 | dec.skipStruct(pl, rdser, fieldsoutcnt, rdser.GetCTag()) |
| 99 | default: |
| 100 | skipTag(rdser, subtag) |
| 101 | } |
| 102 | } |
| 103 | default: |
| 104 | skipTag(rdser, ctagType) |
| 105 | } |
| 106 | } |
| 107 | return true |
| 108 | } |
| 109 | func skipTag(rdser *Serializer, tagType int16) { |
| 110 | switch tagType { |
| 111 | case TAG_DOUBLE: |
no test coverage detected