Skip to content

jsontext: Decoder.Reset and Encoder.Reset should allow nil #57

Open
@dsnet

Description

@dsnet

I'm using jsontext.Encoder and jsontext.Decoder with a sync.Pool. Ideally, I should be able to put the encoder/decoder back into the pool without referencing the memory for the underlying io.Reader and io.Writer. Unfortunately, calling Reset(nil) panics. We should permit nil and just allow subsequent method calls to panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions