Open atombender opened 7 years ago
Oh, and this fixes #54.
@davecgh Thoughts? I was thinking of changing the nil functionality to disable all zero values, which will cover more use cases.
I really like the DisableNilValues
option
@davecgh do you think we could move this along? It would help us resolve https://github.com/stretchr/testify/issues/288. Or, if it's not going to happen, we can just close that or maybe try to fix it on our end. Either way works for me.
For the DisableNilValues
I think #77 is better suited as it covers all zero cases.
Adds config option
AlwaysIncludeTrailingComma
, which forces the writing of commas in arrays/slices/maps. Useful in tests to avoid false positives when diffing. This is a prerequisite to resolving this Testify issue.Building on that commit is a new config option
DisableNilValues
. Background: We have a bunch of tests that use Spew to generate "golden" test data. This is great, but often one adds a new, optional field to a struct that's part of this data, and suddenly all the test data is broken because the new filed isnil
everywhere. It's onerous to update all test data for such zero-value fields. This fixes that.