(b []byte)
| 1316 | } |
| 1317 | |
| 1318 | func (p *ExampleErrorResp) FastRead(b []byte) (off int, err error) { |
| 1319 | var ftyp thrift.TType |
| 1320 | var fid int16 |
| 1321 | var l int |
| 1322 | x := thrift.BinaryProtocol{} |
| 1323 | for { |
| 1324 | ftyp, fid, l, err = x.ReadFieldBegin(b[off:]) |
| 1325 | off += l |
| 1326 | if err != nil { |
| 1327 | goto ReadFieldBeginError |
| 1328 | } |
| 1329 | if ftyp == thrift.STOP { |
| 1330 | break |
| 1331 | } |
| 1332 | switch uint32(fid)<<8 | uint32(ftyp) { |
| 1333 | case 0x20a: // p.Int64 ID:2 thrift.I64 |
| 1334 | p.Int64, l, err = x.ReadI64(b[off:]) |
| 1335 | off += l |
| 1336 | if err != nil { |
| 1337 | goto ReadFieldError |
| 1338 | } |
| 1339 | case 0x40b: // p.Xjson ID:4 thrift.STRING |
| 1340 | p.Xjson, l, err = x.ReadString(b[off:]) |
| 1341 | off += l |
| 1342 | if err != nil { |
| 1343 | goto ReadFieldError |
| 1344 | } |
| 1345 | default: |
| 1346 | l, err = x.Skip(b[off:], ftyp) |
| 1347 | off += l |
| 1348 | if err != nil { |
| 1349 | goto SkipFieldError |
| 1350 | } |
| 1351 | } |
| 1352 | } |
| 1353 | return |
| 1354 | ReadFieldBeginError: |
| 1355 | return off, thrift.PrependError(fmt.Sprintf("%T read field begin error: ", p), err) |
| 1356 | ReadFieldError: |
| 1357 | return off, thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fid, fieldIDToName_ExampleErrorResp[fid]), err) |
| 1358 | SkipFieldError: |
| 1359 | return off, thrift.PrependError(fmt.Sprintf("%T skip field %d type %d error: ", p, fid, ftyp), err) |
| 1360 | } |
| 1361 | |
| 1362 | func (p *ExampleInt2Float) BLength() int { |
| 1363 | if p == nil { |
nothing calls this directly
no test coverage detected