MCPcopy Create free account
hub / github.com/egonelbre/exp / skipUntilEnd

Method skipUntilEnd

ber/decoder.go:133–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131}
132
133func (d *Decoder) skipUntilEnd() (skipped bool, err error) {
134 var t *Token
135 for err != nil {
136 t, err = d.Token()
137 switch t.Kind {
138 case Constructed:
139 skipped = true
140 // recurse
141 _, err = d.skipUntilEnd()
142 case Value:
143 skipped = true
144 // grab the next one
145 t, err = d.Token()
146 case EndConstructed:
147 // finished
148 return
149 }
150 }
151 return
152}
153
154// readBase128Int parses a base-128 encoded int from the given offset in the
155// given byte slice. It returns the value and the new offset.

Callers

nothing calls this directly

Calls 1

TokenMethod · 0.95

Tested by

no test coverage detected