go-cmp v0.3.0 Release NotesRelease Date: 2019-04-29 // about 3 years ago
➕ Added features:
- (#108) The
_field is always ignored when comparing a struct.
- (#109) The naming rules for
cmp.Transformeris relaxed and clearly specified.
cmpopts.AcyclicTransformermakes it easier to write a transformer that avoids infinite recursion when the output type contains the input type.
cmpopts.IgnoreMapEntriesprovide the ability to ignore specific slice elements or map entries.
cmp.Reporterprovides users the ability to add custom difference reporters.
cmp.PathStep.Valuesprovide the current
yarguments at that given path step.
🐛 Bug fixes:
- 🛠 (#87) Fixed proper comparing of slices where one is a sub-slice of the other.
- ✅ (#124) The
cmp.Diffoutput has been completely re-written to provide a unified diff of the two Go objects as a literal in pseudo-Go syntax (example).
- 0️⃣ (#131) The default reporter has built-in heuristics to detect whether a string or a byte-slice looks like binary data or human readable text, and can provide more humanly readable differences in certain use-cases. For example, a string may be detecting as containing multiple lines of text, for which it will print the difference based on the lines.
- (#108) The