Skip to content

v4.0.0

Latest

Choose a tag to compare

@cmilesio cmilesio released this 23 Aug 20:41
· 8 commits to main since this release
e6e3d18

Collection v4 is the supported Go 1.27-native release of collection, rebuilt around a slice-backed API.

Highlights

  • Slice[T] is a named slice, so len, indexing, slicing, range, standard-library helpers, and iterator adapters work directly.
  • Generic methods keep type-changing transformations fluent.
  • Pure operations have consistent ownership semantics.
  • Transform and Retain provide explicit, zero-allocation mutation for hot paths.
  • Every exported function and method has an executable example.
  • The benchmark suite includes direct lo comparisons and permanent v2/v4 regression coverage.

Upgrade

v4 requires Go 1.27 and uses the major-version module path:

import "github.com/goforj/collection/v4"

Existing v2 consumers can upgrade when ready; v2 remains available.

See the v4 migration guide for method-by-method before-and-after examples, removed APIs, and ownership changes.