Hi,
would it be possible to add an option "TimePrecision" analog to "FloatPrecision" which would permit to Truncate the times before comparison.
Reason:
I use deep.Equal to test my Database Interface. I compare the stored Struct with the original one (which contains timestamps). The DB I use (postgres) has a time resolution of Microsecond whereas the golang time.Time has a resolution of Nanosecond. Being able to truncate the timestamps would permit to compare those two.
thanks for considering
Hi,
would it be possible to add an option "TimePrecision" analog to "FloatPrecision" which would permit to Truncate the times before comparison.
Reason:
I use deep.Equal to test my Database Interface. I compare the stored Struct with the original one (which contains timestamps). The DB I use (postgres) has a time resolution of Microsecond whereas the golang time.Time has a resolution of Nanosecond. Being able to truncate the timestamps would permit to compare those two.
thanks for considering