ArrayEachErr is used when iterating arrays and allows the callback to stop iteration by returning an error. io.EOF stops iteration without returning an error. The returned count includes the element whose callback stopped the iteration. SYS-REQ-004
(data []byte, cb func(value []byte, dataType ValueType, offset int, err error) error, keys ...string)
| 1711 | // iteration. |
| 1712 | // SYS-REQ-004 |
| 1713 | func ArrayEachErr(data []byte, cb func(value []byte, dataType ValueType, offset int, err error) error, keys ...string) (count int, err error) { |
| 1714 | _, count, err = arrayEachErr(data, cb, keys...) |
| 1715 | return count, err |
| 1716 | } |
| 1717 | |
| 1718 | // arrayEachErr also returns ArrayEach's closing-bracket offset for use by |
| 1719 | // EachKeyErr while traversing array-index paths. |