Skip to content

Commit

Permalink
chore: update decoder.go (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperlewau authored Aug 20, 2024
1 parent 3a276f3 commit 917a77e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ func NewDecoderForSchema(schema Schema, reader io.Reader) *Decoder {
}

// Decode reads the next Avro encoded value from its input and stores it in the value pointed to by v.
func (d *Decoder) Decode(obj any) error {
func (d *Decoder) Decode(v any) error {
if d.r.head == d.r.tail && d.r.reader != nil {
if !d.r.loadMore() {
return io.EOF
}
}

d.r.ReadVal(d.s, obj)
d.r.ReadVal(d.s, v)

//nolint:errorlint // Only direct EOF errors should be discarded.
if d.r.Error == io.EOF {
Expand Down

0 comments on commit 917a77e

Please sign in to comment.