chore: make methods consistent in signatures (#1971)

* chore: make methods consistent in signatures

* test: fix fails
This commit is contained in:
Kevin Wan
2022-06-05 12:56:13 +08:00
committed by GitHub
parent 3fa8c5940d
commit 1d95e95cf8
4 changed files with 13 additions and 6 deletions

View File

@@ -231,7 +231,7 @@ func (u *Unmarshaler) processFieldPrimitive(field reflect.StructField, value ref
return u.processFieldPrimitiveWithJSONNumber(field, value, v, opts, fullName)
default:
if typeKind == valueKind {
if err := validateValueInOptions(opts.options(), mapValue); err != nil {
if err := validateValueInOptions(mapValue, opts.options()); err != nil {
return err
}
@@ -253,7 +253,7 @@ func (u *Unmarshaler) processFieldPrimitiveWithJSONNumber(field reflect.StructFi
return err
}
if err := validateValueInOptions(opts.options(), v); err != nil {
if err := validateValueInOptions(v, opts.options()); err != nil {
return err
}