Skip to content

Releases: ahmetb/go-linq

v4.0.0 (2025-10-20)

20 Oct 04:30
b945a41

Choose a tag to compare

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).

Full Changelog: v3.2.0...v4.0.0

v3.2.0 (2020-12-29)

29 Dec 21:10
9b75bfd

Choose a tag to compare

  • Added FromChannelT().
  • Added DefaultIfEmpty().

v3.0.0 (2017-01-10)

10 Jan 21:24

Choose a tag to compare

  • Breaking change: ToSlice() now overwrites existing slice starting
    from index 0 and grows/reslices it as needed.
  • Generic/parametrized methods support (Thanks @cleitonmarx!)
    • Accepting parametrized functions was originally proposed in #26
    • You can now avoid type assertions and interface{}s
    • Functions with generic methods are named as MethodNameT
    • Method signatures for the existing LINQ methods are unchanged.
  • Added ForEach(), ForEachIndexed() and AggregateWithSeedBy().

Also thanks @kalaninja for working on this release.

v2.0.0 (2016-09-02)

11 Sep 17:36

Choose a tag to compare

IMPORTANT: Breaking Changes

v2.0 release contains BREAKING changes to the API.

The old version is archived at the archive/0.9 branch or the 0.9 tags.

Changelog

  • v2.0 is A COMPLETE REWRITE of go-linq with better performance and memory
    efficiency.
    (thanks @kalaninja!)
  • API has significantly changed. Most notably:
    • linq.T removed in favor of interface{}
    • library methods no longer return errors
    • PLINQ removed for now (see channels support)
    • support for channels, custom collections and comparables

v0.9-rc5

09 Apr 10:46

Choose a tag to compare

SelectMany/SelectManyBy added
docs fixes