Open powerman opened 7 years ago
Sorry for slow reply. No significant reason that I can recall. To see how it works out, can you submit a PR? To maintain backward-compatibility, it might need to be an option that's off by default because as other issues/PRs have noted, some people depends on the diff output, so if we change it we mess things up for them.
I'm afraid it's a bit too late - I've already solved this issue another way with https://godoc.org/github.com/powerman/check. Feel free to close this issue if you like to.
Is there any reason to generate diff text using
instead of
At a glance second way is better because it keeps original type and thus if that type implements Stringer interface then diff will contains values in much more readable form than just a number. (With a lot of
iota
consts reading diff with numbers is really hard.) Of course, same probably apply to other types, not just to integer ones.