francoispqt / gojay

high performance JSON encoder/decoder with stream API for Golang
MIT License
2.11k stars 113 forks source link

Manually adding an error to an Encoder #168

Open humandad opened 2 years ago

humandad commented 2 years ago

Is there any way to manually add an error to an Encoder?

It seems pretty simple, so maybe I'm missing something. Would an enc.AddError(error) method make sense?