Releases: bobg/go-generics
v4.2.0 - Add Rindex, RindexFunc, PrefixFunc, and SuffixFunc
What's Changed
Full Changelog: v4.1.2...v4.2.0
Remove circular dependency
What's Changed
Full Changelog: v4.1.0...v4.1.2
Version 4 API, take two
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
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]
Scalar types for iter.SQL[T]
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
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
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
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
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.