(w jsWriter, msg []byte, scratch []byte, depth int)
| 60 | } |
| 61 | |
| 62 | func writeNext(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { |
| 63 | if len(msg) < 1 { |
| 64 | return msg, scratch, ErrShortBytes |
| 65 | } |
| 66 | t := getType(msg[0]) |
| 67 | if t == InvalidType { |
| 68 | return msg, scratch, InvalidPrefixError(msg[0]) |
| 69 | } |
| 70 | if t == ExtensionType { |
| 71 | et, err := peekExtension(msg) |
| 72 | if err != nil { |
| 73 | return nil, scratch, err |
| 74 | } |
| 75 | if et == TimeExtension || et == MsgTimeExtension { |
| 76 | t = TimeType |
| 77 | } |
| 78 | } |
| 79 | return unfuns[t](w, msg, scratch, depth) |
| 80 | } |
| 81 | |
| 82 | func rwArrayBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { |
| 83 | if depth >= recursionLimit { |
no test coverage detected
searching dependent graphs…