(data []byte)
| 284 | const phasePanicMsg = "JSON decoder out of sync - data changing underfoot?" |
| 285 | |
| 286 | func (d *decodeState) init(data []byte) *decodeState { |
| 287 | d.data = data |
| 288 | d.off = 0 |
| 289 | d.savedError = nil |
| 290 | d.errorContext.Struct = nil |
| 291 | d.errorContext.Field = "" |
| 292 | return d |
| 293 | } |
| 294 | |
| 295 | // saveError saves the first err it is called with, |
| 296 | // for reporting at the end of the unmarshal. |