chaokunyang opened a new issue, #3026:
URL: https://github.com/apache/fory/issues/3026
### Feature Request
_No response_
### Is your feature request related to a problem? Please describe
Current we return error in every function call, and check error in every
place, the code is kind of messy:
```go
if writeRef {
if value.IsNil() {
ctx.Buffer().WriteInt8(NullFlag)
return nil
}
refWritten, err :=
ctx.RefResolver().WriteRefOrNull(ctx.Buffer(), value)
if err != nil {
return err
}
if refWritten {
return nil
}
}
```
### Describe the solution you'd like
Use centralized error state in `WriteContext/ReadContext` to simplify error
handle, as we did in c++ #3009
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]