What's Changed
-
Adopts Go’s standard iterator pattern (Go 1.23+).
Manual iteration overQuerynow follows theiterpackage pattern and integrates cleanly withfor … range. This is a breaking change for manual iteration. -
Typed constructors for common sources:
FromSlice,FromMap,FromChannel,FromChannelWithContext,FromString, andFromIterable. The legacyFrom()remains for convenience but is reflection‑based and not recommended for new code. -
Channel iteration w/ cancellation:
NewFromChannelWithContext(ctx, ch)allows to iterate over a channel with cancelation . (Closes #93) -
ToSliceuses the standard growth strategy. (Closes #109) -
ToSliceconverts query elements to the slice element type, if these can't be assigned directly. -
Docs/examples updated for v4, including
anyin place ofinterface{}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 … rangeergonomics. -
Removed:
FromChannelT()in favor ofFromChannel().
Minimum Go version
Go 1.23+ (due to use of the standard iter package).
Full Changelog: v3.2.0...v4.0.0