More stuff, add stuff, add todos

This commit is contained in:
Melody Becker 2024-09-13 15:02:32 +02:00
parent 28c5f546fe
commit f69480b6b4
12 changed files with 40 additions and 4 deletions

View file

@ -42,7 +42,9 @@ func (p *EncoderPool) Encode(raw any) ([]byte, error) {
defer encoder.Unlock()
// Clear the buffer to avoid funky output from previous operations
encoder.Buffer.Reset()
encoder.Encoder.Encode(raw)
if err := encoder.Encoder.Encode(raw); err != nil {
return nil, err
}
data, err := io.ReadAll(encoder.Buffer)
if err != nil {
return nil, err