Skip to content

Commit

Permalink
decoder: remove mention of UnmarshalText in errors (#751)
Browse files Browse the repository at this point in the history
Fixes #737
  • Loading branch information
pelletier authored Apr 8, 2022
1 parent 89d7b41 commit f5cc8c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unmarshaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ func (d *decoder) tryTextUnmarshaler(node *ast.Node, v reflect.Value) (bool, err
if v.CanAddr() && v.Addr().Type().Implements(textUnmarshalerType) {
err := v.Addr().Interface().(encoding.TextUnmarshaler).UnmarshalText(node.Data)
if err != nil {
return false, newDecodeError(d.p.Raw(node.Raw), "error calling UnmarshalText: %w", err)
return false, newDecodeError(d.p.Raw(node.Raw), "%w", err)
}

return true, nil
Expand Down

0 comments on commit f5cc8c4

Please sign in to comment.