MCPcopy Index your code
hub / github.com/tinylib/msgp / rwArrayBytes

Function rwArrayBytes

msgp/json_bytes.go:82–108  ·  view source on GitHub ↗
(w jsWriter, msg []byte, scratch []byte, depth int)

Source from the content-addressed store, hash-verified

80}
81
82func rwArrayBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) {
83 if depth >= recursionLimit {
84 return msg, scratch, ErrRecursion
85 }
86 sz, msg, err := ReadArrayHeaderBytes(msg)
87 if err != nil {
88 return msg, scratch, err
89 }
90 err = w.WriteByte('[')
91 if err != nil {
92 return msg, scratch, err
93 }
94 for i := range sz {
95 if i != 0 {
96 err = w.WriteByte(',')
97 if err != nil {
98 return msg, scratch, err
99 }
100 }
101 msg, scratch, err = writeNext(w, msg, scratch, depth+1)
102 if err != nil {
103 return msg, scratch, err
104 }
105 }
106 err = w.WriteByte(']')
107 return msg, scratch, err
108}
109
110func rwMapBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) {
111 if depth >= recursionLimit {

Callers

nothing calls this directly

Calls 3

ReadArrayHeaderBytesFunction · 0.85
writeNextFunction · 0.85
WriteByteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…