Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier committed Dec 11, 2023
1 parent fca11a6 commit a8ed6d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unmarshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,8 @@ func (d *decoder) handleKeyValuePart(key unstable.Iterator, value *unstable.Node
f := fieldByIndex(v, path)

if !f.CanAddr() {
// If the field is not settable, need to take a slower path and make a copy of
// the struct itself to a new location.
// If the field is not addressable, need to take a slower path and
// make a copy of the struct itself to a new location.
nvp := reflect.New(v.Type())
nvp.Elem().Set(v)
v = nvp.Elem()
Expand Down

0 comments on commit a8ed6d3

Please sign in to comment.