Skip to content

Version 0.6.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 20 Aug 22:00
· 4 commits to main since this release
v0.6.0
bfd2f7e

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 and WithAnnotator, 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 with RenderUnexportedStructFields, note the logic is inverted.
  • [BC] Replaced Config.OmitPackagePaths with RenderPackagePaths, note the logic is inverted.
  • Bumped the minimum supported Go version to 1.21.

Removed

  • [BC] Removed DefaultPrinter, use NewPrinter() instead.
  • [BC] Removed Config.Indent and DefaultIndent constant.
  • [BC] Removed Config.RecursionMarker and DefaultRecursionMarker constant.
  • [BC] Removed Config.ZeroValueMarker and DefaultZeroValueMarker constant.

Fixed

  • Renderer.Config() and Renderer.WithModifiedConfig() now properly clone the slices within Config.