r3labs / diff

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

Obscure Tag #96

Open silverark opened 1 year ago

silverark commented 1 year ago

Sometimes we want to record that a field has been changed, but not actually show the changes performed. A good example is a password hash, or a network passphrase.

We would be interested in a "obscure" field tag, that would record the change but maybe star out, or null the actual field values. Just returning null for from and to would be easiest I guess?

Obscure wouldn't work with patching, so not sure if it's too niche for you?

I'm happy to make a pull request if you think it would fit in with the library, otherwise we can form and just keep the functionality in our own version.

Happy for feedback!