Disclaimer: This is my first pull request on an open-source project.
Summary
This PR adapts the EqualExportedValues method to also handle pointer types, on top of struct types.
Changes
The function copyExportedFields already handles pointer types correctly. Therefore it is only necessary to make the validation include pointer types.
The added tests pass, which validates this hypothesis.
Motivation
It is useful for proto message equality. Using Equal often fails because unexported values of proto messages are different.
Disclaimer: This is my first pull request on an open-source project.
Summary
This PR adapts the
EqualExportedValues
method to also handle pointer types, on top of struct types.Changes
The function
copyExportedFields
already handles pointer types correctly. Therefore it is only necessary to make the validation include pointer types. The added tests pass, which validates this hypothesis.Motivation
It is useful for proto message equality. Using
Equal
often fails because unexported values of proto messages are different.Related issues
Closes #758