You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off. Thanks for sharing this library! It's exactly what I needed and really does the job well. I think it makes sense to fork a deep pretty-printed, and base the diff on that as you've done with go-spew.
After running messagediff.PrettyDiff on a few data sets, I noticed one aspect that could be improved with regards to the readability of the output. Currently array and slice indices are printed in lexicographic order, whereas natural sorting would make the output more intuitive.
For instance, the current output of messagediff.PrettyDiff is as follows:
For natural sorting, feel free to use any library you see fit, or for that matter copy over the implementation from https://github.com/llir/llvm/tree/master/internal/natsort which is based on @fvbommel's natural sorting package. The code is MIT licensed. (any code changes I did are released into the public domain).
Wish you all the best and happy times ahead!
Cheers,
Robin
The text was updated successfully, but these errors were encountered:
mewmew
added a commit
to mewpull/messagediff
that referenced
this issue
Aug 27, 2019
Hi @d4l3k,
First off. Thanks for sharing this library! It's exactly what I needed and really does the job well. I think it makes sense to fork a deep pretty-printed, and base the diff on that as you've done with go-spew.
After running
messagediff.PrettyDiff
on a few data sets, I noticed one aspect that could be improved with regards to the readability of the output. Currently array and slice indices are printed in lexicographic order, whereas natural sorting would make the output more intuitive.For instance, the current output of
messagediff.PrettyDiff
is as follows:And with natural sorting applied, it would look as follows:
For natural sorting, feel free to use any library you see fit, or for that matter copy over the implementation from https://github.com/llir/llvm/tree/master/internal/natsort which is based on @fvbommel's natural sorting package. The code is MIT licensed. (any code changes I did are released into the public domain).
Wish you all the best and happy times ahead!
Cheers,
Robin
The text was updated successfully, but these errors were encountered: