What's Changed
-
Adopts Go’s standard iterator pattern (Go 1.23+).
Manual iteration overQuery
now follows theiter
package 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) -
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 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 … range
ergonomics. -
Removed:
FromChannelT()
in favor ofFromChannel()
.
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