Skip to content

v1.3.0

Latest

Choose a tag to compare

@Code-Hex Code-Hex released this 04 Oct 09:09
db9f227

What's Changed

  • Add DumpTo(io.Writer, value, ...options) for streaming output. Dump wraps the same implementation. Reduce intermediate allocations and propagate writer errors. (#44)
  • Generate valid big.Int expressions and preserve nil pointers. (#45)
  • Preserve exact json.RawMessage bytes and nil values, including backticks, control characters, and invalid UTF-8. (#46)
  • Preserve big.Float values, precision, rounding mode, signed zero, and infinities. (#47)
  • Reduce RichBytes intermediate allocations while preserving its hexdump layout and nil values. (#48)
  • Write printer output directly, preserve byte counts, and propagate formatter and writer errors. (#49)

Compatibility Notes

Existing APIs remain available. The module's go directive remains at 1.18, with the pre-generics API available on Go 1.16 and 1.17 through build tags.

DumpTo can return an error after writing partial output. Maps and custom formatters still use local buffering. RichBytes retains a complete output block, and the printer retains each operand's dumped source for tokenization. These paths do not guarantee bounded memory for arbitrary input sizes.

WithBigFloat preserves the value and its configuration, but not the accuracy flag of the operation that produced it.

Validation

The merged source passed Go 1.16 and Go 1.27 tests, Go 1.27 race checks and vet, and the Go 1.16–1.27 CI matrix. Generated expressions were compiled and executed to verify round-trip values.

Full Changelog: v1.2.0...v1.3.0