MCPcopy
hub / github.com/tinylib/msgp / recursiveCall

Method recursiveCall

msgp/read.go:272–280  ·  view source on GitHub ↗

recursiveCall will increment the recursion depth and return an error if it is exceeded. If a nil error is returned, done must be called to decrement the counter.

()

Source from the content-addressed store, hash-verified

270// recursiveCall will increment the recursion depth and return an error if it is exceeded.
271// If a nil error is returned, done must be called to decrement the counter.
272func (m *Reader) recursiveCall() (done func(), err error) {
273 if m.recursionDepth >= m.GetMaxRecursionDepth() {
274 return func() {}, ErrRecursion
275 }
276 m.recursionDepth++
277 return func() {
278 m.recursionDepth--
279 }, nil
280}
281
282// ReadFull implements `io.ReadFull`
283func (m *Reader) ReadFull(p []byte) (int, error) {

Callers 5

CopyNextMethod · 0.95
SkipMethod · 0.95
ReadIntfMethod · 0.95
rwMapFunction · 0.80
rwArrayFunction · 0.80

Calls 1

GetMaxRecursionDepthMethod · 0.95

Tested by

no test coverage detected