r3labs / diff

A library for diffing golang structures
Mozilla Public License 2.0
888 stars 80 forks source link

handling type change #35

Closed noiseoverip closed 4 years ago

noiseoverip commented 4 years ago

Hi, i ran into an issue where i provide differ with maps where type of one of the values within map has changed - currently this result in an error since isvalid() method doesn't allow this. Would you accept a change which would optionally (through opts) change behaviour for this kind of situation and would just report a change for that key ?

purehyperbole commented 4 years ago

Hi there, thanks for raising the issue.

Sure, I think that's definitely an edge-case that needs to be handled. I'd be more than happy to accept a PR handling that as an option!