(index int, rvkencname string)
| 1827 | } |
| 1828 | |
| 1829 | func (d *Decoder) structFieldNotFound(index int, rvkencname string) { |
| 1830 | // Note: rvkencname is used only if there is an error, to pass into d.errorf. |
| 1831 | // Consequently, it is ok to pass in a stringView |
| 1832 | // Since rvkencname may be a stringView, do NOT pass it to another function. |
| 1833 | if d.h.ErrorIfNoField { |
| 1834 | if index >= 0 { |
| 1835 | d.errorf("no matching struct field found when decoding stream array at index %v", index) |
| 1836 | } else if rvkencname != "" { |
| 1837 | d.errorf("no matching struct field found when decoding stream map with key " + rvkencname) |
| 1838 | } |
| 1839 | } |
| 1840 | d.swallow() |
| 1841 | } |
| 1842 | |
| 1843 | func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { |
| 1844 | if d.h.ErrorIfNoArrayExpand { |
no test coverage detected