Skip to content

Releases: bobg/go-generics

v4.2.0 - Add Rindex, RindexFunc, PrefixFunc, and SuffixFunc

09 Jun 13:33
2413cff

Choose a tag to compare

What's Changed

  • Add Rindex, RindexFunc, PrefixFunc, and SuffixFunc in slices by @bobg in #26

Full Changelog: v4.1.2...v4.2.0

Remove circular dependency

14 Jan 15:16
37e4a61

Choose a tag to compare

What's Changed

  • Remove circular dependency on github.com/bobg/seqs by @bobg in #24

Full Changelog: v4.1.0...v4.1.2

Version 4 API, take two

17 Aug 03:43
50a3d39

Choose a tag to compare

What's Changed

This is the new official release of the v4 API. Callers should not use v4.0.0, which is now retracted, because of an incompatible change: removing the ~func type parameters from functions in parallel.

This release updates go-generics to new major version 4 for the release of Go 1.23.

This release removes the iter and maps packages.

The iter.Of[T] type was made obsolete with the introduction of Go 1.23 iterators. The functionality previously available for iter.Of[T] iterators has now been replicated for Go 1.23 iterators in the github.com/bobg/seqs package (qv).

Operations in other subpackages that produced or consumed iter.Of[T] iterators now use Go's standard iter.Seq[T] iterators.

The maps package was mostly redundant with the Go standard library.

Additionally, combinatorial operations previously found in the slices package have now moved to github.com/bobg/combo.

Full Changelog: v3.7.0...v4.1.0

Version 4 API for Go 1.23

16 Aug 14:48
1998b09

Choose a tag to compare

This release updates go-generics to new major version 4 for the release of Go 1.23. Note: this release is retracted. Callers should use v4.1.0 or later.

This release removes the iter and maps packages.

The iter.Of[T] type was made obsolete with the introduction of Go 1.23 iterators. The functionality previously available for iter.Of[T] iterators has now been replicated for Go 1.23 iterators in the github.com/bobg/seqs package (qv).

Operations in other subpackages that produced or consumed iter.Of[T] iterators now use Go's standard iter.Seq[T] iterators.

The maps package was mostly redundant with the Go standard library.

Additionally, combinatorial operations previously found in the slices package have now moved to github.com/bobg/combo.

Full Changelog: v3.7.0...v4.0.0

Add Find method to set.Of[T]

04 Aug 15:40
8b93207

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.6.2...v3.7.0

Scalar types for iter.SQL[T]

07 Jul 01:47
2cd7a2b

Choose a tag to compare

This release adds the ability to use scalar types as the type parameter to iter.SQL (which previously could operate only on structs).

Full Changelog: v3.5.0...v3.6.0

Adapters from Go 1.23 iterators to iter.Of

09 Feb 15:03
9680c2c

Choose a tag to compare

This release adds iter.FromSeq, iter.FromSeq2, iter.FromSeqContext, and iter.FromSeq2Context, for adapting Go 1.23 iterators to iter.Of.

New function iter.LongLines

09 Feb 15:02
09c6ead

Choose a tag to compare

This release adds iter.LongLines, which produces an iterator of io.Readers over the lines of some input. Unlike iter.Lines (and unlike bufio.Scanner, on which iter.Lines is based), LongLines is not subject to a line-length limitation.

Update for Go 1.22

07 Feb 15:08
0dfeb15

Choose a tag to compare

This release updates go-generics for Go 1.22.

It adds slices.Concat so the slices package remains a drop-in replacement for the standard-library version.

It also adds the functions iter.All, iter.AllCount, iter.AllPairs, and the types iter.Seq and iter.Seq2. These allow creating Go 1.23-style iterators from an iter.Of. A preview of Go 1.23 iterators is available in Go 1.22 by building with GOEXPERIMENT=rangefunc. When that is set, this module also defines iter.Pull and iter.Pull2. For more information about Go 1.23 iterators, see Rangefunc Experiment.

V3 API

13 Aug 19:09
2d45c13

Choose a tag to compare

Version 2 of this module relied on golang.org/x/exp, which had incompatible changes made in the lead-up to Go 1.21, requiring some function signatures to change. So here's version 3, with those new signatures and other adaptations. The dependency on golang.org/x/exp is removed and the minimum Go version is now 1.21.