chore: coding style (#3413)
This commit is contained in:
@@ -618,7 +618,7 @@ func (u *Unmarshaler) processFieldPrimitiveWithJSONNumber(fieldType reflect.Type
|
||||
|
||||
target.SetFloat(fValue)
|
||||
default:
|
||||
return newTypeMismatchErrorWithHint(fullName, value.Type().String(), typeKind.String())
|
||||
return newTypeMismatchErrorWithHint(fullName, typeKind.String(), value.Type().String())
|
||||
}
|
||||
|
||||
SetValue(fieldType, value, target)
|
||||
@@ -1054,8 +1054,9 @@ func newTypeMismatchError(name string) error {
|
||||
return fmt.Errorf("type mismatch for field %q", name)
|
||||
}
|
||||
|
||||
func newTypeMismatchErrorWithHint(name, errorType, rightType string) error {
|
||||
return fmt.Errorf("type mismatch for field %q, expected %q, got %q", name, rightType, errorType)
|
||||
func newTypeMismatchErrorWithHint(name, expectType, actualType string) error {
|
||||
return fmt.Errorf("type mismatch for field %q, expect %q, actual %q",
|
||||
name, expectType, actualType)
|
||||
}
|
||||
|
||||
func readKeys(key string) []string {
|
||||
|
||||
Reference in New Issue
Block a user