From adac9ef73881aac7dad87ebedb9cc57181d131c0 Mon Sep 17 00:00:00 2001 From: renthraysk <30576707+renthraysk@users.noreply.github.com> Date: Thu, 18 Apr 2024 01:32:10 +0100 Subject: [PATCH] Fix panic message in Decoder.Reset (#32) Decoder panic message refers to io.Writer, when it should be io.Reader. --- jsontext/decode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsontext/decode.go b/jsontext/decode.go index d1ef6ae..366e057 100644 --- a/jsontext/decode.go +++ b/jsontext/decode.go @@ -132,7 +132,7 @@ func (d *Decoder) Reset(r io.Reader, opts ...Options) { case d == nil: panic("jsontext: invalid nil Decoder") case r == nil: - panic("jsontext: invalid nil io.Writer") + panic("jsontext: invalid nil io.Reader") case d.s.Flags.Get(jsonflags.WithinArshalCall): panic("jsontext: cannot reset Decoder passed to json.UnmarshalerV2") }