Skip to content

v4.0.0 (2025-10-20)

Latest

Choose a tag to compare

@kalaninja kalaninja released this 20 Oct 04:30
b945a41

What's Changed

  • Adopts Go’s standard iterator pattern (Go 1.23+).
    Manual iteration over Query now follows the iter package pattern and integrates cleanly with for … range. This is a breaking change for manual iteration.

  • Typed constructors for common sources:
    FromSlice, FromMap, FromChannel, FromChannelWithContext, FromString, and FromIterable. The legacy From() remains for convenience but is reflection‑based and not recommended for new code.

  • Channel iteration w/ cancellation:
    New FromChannelWithContext(ctx, ch) allows to iterate over a channel with cancelation . (Closes #93)

  • ToSlice uses the standard growth strategy. (Closes #109)

  • ToSlice converts query elements to the slice element type, if these can't be assigned directly.

  • Docs/examples updated for v4, including any in place of interface{} and typed constructors throughout.

  • Fixed #113

Breaking changes

  • Manual iteration API changed. Code that previously relied on custom iterator functions must switch to the new pattern. Example from the README shows the transformation and the new for … range ergonomics.

  • Removed: FromChannelT() in favor of FromChannel().

Minimum Go version

Go 1.23+ (due to use of the standard iter package).

Thanks @kalaninja for working on this release.
Full Changelog: v3.2.0...v4.0.0