Colorize the diffs produced by assert.Equal #1479
Labels
enhancement: colored output
About adding colored output
enhancement
pkg-assert
Change related to package testify/assert
When running tests in IDE/text editor, it's difficult to analyze the diffs produced by assert.Equal without somehow highlighting the different lines. This could be improved by making diff colorized. That is, make the "expected" lines red and make the "actual" lines green. The result could be similar to what https://github.com/mcmire/super_diff/tree/main provides
Teistify uses
difflib
that is no longer maintained and cannot be extended to modify the diff structure, so it might be better to switch to another library: https://github.com/sergi/go-diff. It provides structured diffs and can be used to colorize the outputThe text was updated successfully, but these errors were encountered: