Added Features:
-
Add implicit filter to transformers where a
Transformercan only apply if that specific transformer does not already exist within the tail of the currentPathsince the last non-transform step. This filter makes it easier to create same-type transformations (e.g.,func(T) T) without needing to manually add your own filter. (#29) -
Add
Path.Indexmethod, which provides an easier way to index aPathwithout needing to manually perform bounds checking. (#56) -
Add
Transform.Optionmethod, which returns the originalTransformeroption. This enables the creation of non-reentrant transformers. (#59) -
Add handling for
puregobuild tag, which prevents use ofunsafe, which is necessary to implementAllowUnexported. However,unsafeis not available in some build environments such as GopherJS and Google AppEngine Standard. A future release will remove special casing for these two environments. (#68)
Reporting changes:
Diffonly batches multiple differences together for slices of primitives. (#45)Diffprints uses asprefix to indicate that theStringmethod was used. (#46)Diffprints strings using the raw literal syntax when helpful. (#46)Diffreports the type of a primitive when helpful. (#65)Path.GoStringelides printing type assertions on anonymous types. (#21)
Bug fixes:
- Unexported map values no longer panics when printing. (#38)
- Explicitly convert assignable nil interface values. This works around a reflect bug present in Go1.9 and below. (#49)