Version 0.6.0
Pre-release
Pre-release
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
.