Skip to content

Commit

Permalink
Fix panic message in Decoder.Reset (#32)
Browse files Browse the repository at this point in the history
Decoder panic message refers to io.Writer, when it should be io.Reader.
  • Loading branch information
renthraysk authored Apr 18, 2024
1 parent 2f02d56 commit adac9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsontext/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit adac9ef

Please sign in to comment.