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

Function Skip

msgp/read_bytes.go:1319–1321  ·  view source on GitHub ↗

Skip skips the next object in 'b' and returns the remaining bytes. If the object is a map or array, all of its elements will be skipped. Possible errors: - [ErrShortBytes] (not enough bytes in b) - [InvalidPrefixError] (bad encoding) - [ErrRecursion] (too deeply nested data)

(b []byte)

Source from the content-addressed store, hash-verified

1317// - [InvalidPrefixError] (bad encoding)
1318// - [ErrRecursion] (too deeply nested data)
1319func Skip(b []byte) ([]byte, error) {
1320 return skipDepth(b, 0)
1321}
1322
1323func skipDepth(b []byte, depth int) ([]byte, error) {
1324 if depth >= recursionLimit {

Callers 6

BenchmarkSkipBytesFunction · 0.85
TestSkipRecursionFunction · 0.85
FuzzReadBytesFunction · 0.85
locateFunction · 0.85
locateKVFunction · 0.85
UnmarshalMsgMethod · 0.85

Calls 1

skipDepthFunction · 0.85

Tested by 3

BenchmarkSkipBytesFunction · 0.68
TestSkipRecursionFunction · 0.68
FuzzReadBytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…