(w jsWriter, msg []byte, scratch []byte, depth int)
| 80 | } |
| 81 | |
| 82 | func 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 | |
| 110 | func rwMapBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { |
| 111 | if depth >= recursionLimit { |
nothing calls this directly
no test coverage detected
searching dependent graphs…