Releases: dogmatiq/dapper
Releases · dogmatiq/dapper
Version 0.6.0
This release is largely centered around a refactoring of the Config
type and the way that a Printer
is configured. It should not affect most users, but does introduce some breaking changes for filter authors.
Added
- Added
Annotator
,Config.Annotators
andWithAnnotator
, to add user-defined text annotations to rendered values. - Added
NewPrinter()
function, that accepts the following functional options:WithFilter()
WithDefaultFilters()
WithAnnotator()
WithUnexportedStructFields()
WithPackagePaths()
Changed
- [BC] Replaced
Config.OmitUnexportedFields
withRenderUnexportedStructFields
, note the logic is inverted. - [BC] Replaced
Config.OmitPackagePaths
withRenderPackagePaths
, note the logic is inverted. - Bumped the minimum supported Go version to 1.21.
Removed
- [BC] Removed
DefaultPrinter
, useNewPrinter()
instead. - [BC] Removed
Config.Indent
andDefaultIndent
constant. - [BC] Removed
Config.RecursionMarker
andDefaultRecursionMarker
constant. - [BC] Removed
Config.ZeroValueMarker
andDefaultZeroValueMarker
constant.
Fixed
Renderer.Config()
andRenderer.WithModifiedConfig()
now properly clone the slices withinConfig
.
Version 0.5.3
Fixed
- Fixed rendering of named types that was accidentally removed in [0.5.2].
Version 0.5.2
Changed
interface{}
is now rendered asany
.- Zero-valued arrays are now rendered with the "zero value marker", similarly to structs.
Fixed
- Fixed inconsistent rendering of "element" type names within pointers, channels, maps, slices and functions.
Version 0.5.1
Changed
- Use zero-allocation natural sorting algorithm from
dogmatiq/jumble
.
Version 0.5.0
This release includes several changes to the experimental Filter
system in preparation for unification of built-in and custom rendering behavior.
Added
- Added
Renderer
interface. - Added
ErrorFilter
. Output for types that implementerror
now include the error message. - Added
Is()
,AsConcrete()
andAsImplementationOf()
helpers for use inFilter
implementations.
Changed
- [BC] The signature of
Filter
has changed to accept aRenderer
andValue
. - [BC] Renamed
ReflectTypeFilter
toReflectFilter
, it now applies to the entirereflect
package. - [BC] Renamed
ProtobufFilter
toProtoFilter
. - [BC] Changed
Config.Indent
to astring
.
Removed
- [BC] Removed
DurationFilter
.TimeFilter
now applies to the entiretime
package. - Removed dependency on [Iago]
Fixed
- Fixed duplicate application of
Filter
that apply to specific interfaces when whenT
and*T
both implement the interface.
Version 0.4.6
Fixed
- Fix rendering of
sync.RWMutex
under Go v1.20
Version 0.4.5
Version 0.4.4
Version 0.4.3
Added
- Improved rendering of protocol buffers messages (thanks @mrubiosan)
Version 0.4.2
Added
- Add
OmitUnexportedFields
option (thanks @mrubiosan)