PackageTrack
Sign in Get early access

github.com/samber/lo

v1.53.0 #130 most downloaded on Go modules samber/lo

What this package is like to depend on

Last release 10 days ago

13 Aug 2026

Ships on a steady schedule

a new release about every 2 weeks

Rarely documented

notes for 10 of 64 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

308 releases · first in 2022

90 releases in the last 12 months

see the full history below

Release timeline

308 releases · Mar 2022 to Aug 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 308
  1. v1.53.0 02 Mar 2026
    Release notes

    Announcing the latest release of lo with lots of good gifts! 🎁

    🌊 First, a big thanks to @d-enk for making lots of performance improvements in the recent weeks.

    🧪 Second, this release introduces a new simd experimental package. If you run on an amd64 architecture and a recent CPU, you can perform very fast operations thanks to SIMD CPU instructions.
    -> Documentation: https://lo.samber.dev/docs/experimental/simd

    💥 Third, this version adds *Err variants of many lo helpers (like MapErr, FlatMapErr, ReduceErr, etc.) whose callbacks can return an error and short-circuit execution when one occurs.

    Note

    The simd sub-package is considered not stable. We might break the initial API based on developers' feedback in the coming months.


    Features & improvements

    • feat: adding SIMD helpers by @samber in #801
    • feat: adding Error variants: MapErr, FlatMapErr, ReduceErr... by @samber in #823
    • feat: support for buffer iterator by @mimol91 in #824
    • feat: add Take, TakeWhile, FilterTake, Window, and Sliding functions by @juliazadorozhnaya in #760
    • feat: add a Concat slice function. by @FGasper in #714
    • feat: add iterator slice helpers by @juliazadorozhnaya in #791
    • feat(it): adding loit.Concat by @samber in #722
    • feat: Allow Union/Intersect to take many lists by @frankywahl in #181
    • feat: Add Clone function to return shallow copy of slice collections by @quexer in #732
    • feat: IntersectBy by @ghosx in #653
    • feat: Support Custom Assert by @RelicOfTesla in #755
    • feat: Must support Custom error handler. by @RelicOfTesla in #752
    • feat: WithoutNth handle non-comparable types by @urisimchoni in #774
    • refactor: remove unnecessary type arguments in NewThrottle by @d-enk in #773
    • refactor: lo.IntersectBy + adding loit.IntersectBy + adding doc by @samber in #739
    • fix: rename IsSortedByKey to IsSortedBy by @NathanBaulch in #735
    • fix(iter/tuples): support break iteration over Zip[By] seq by @d-enk in #757
    • fix(it.Mode): align behavior with lo.Mode and ensure consistent slice… by @intojhanurag in #711
    • fix: improve Clone function to preserve nilness and avoid liveness issues by @quexer in #740
    • fix: reset n counter per iteration in it.Replace by @LikimiaD in #799
    • fix: make Ellipsis operate on runes instead of bytes to prevent Unicode truncation by @veeceey in #796
    • fix: correct DropByIndex handling of negative indices out of bounds by @d-enk in #778

    Deprecation

    • refactor: remove helpers deprecated for more than 3y by @samber in #810

    Performance improvements

    • feat: Optimize UniqMap to reduce unnecessary slice preallocation by @ivolkoff in #710
    • refactor(it): simplify DropLast, TrimSuffix, TrimPrefix and use range loops by @d-enk in #782
    • bench: fix iterators to actually iterate in benchmarks by @d-enk in #781
    • refactor: simplify slice cut/trim prefix/suffix functions by @d-enk in #787
    • perf: optimize Sliding by pre-allocating result capacity by @d-enk in #783
    • refactor: improve SamplesBy performance and revert non-panic behavior for negative count by @d-enk in #786
    • feat(perf): speed up some functions with linear complexity O=n2 -> O=2n by @samber in #726
    • perf: only allocate a single map in Intersect by @NathanBaulch in #736
    • perf: preallocate Words string buffer by @NathanBaulch in #728
    • refactor: improve lo[it].Intersect[By] readability and performance by @d-enk in #756
    • perf: preallocate result slice in SamplesBy by @d-enk in #766
    • perf: optimize PartitionBy by eliminating redundant append by @d-enk in #765
    • perf: correct prealloc of the result in FindUniques/Duplicates[By] by @d-enk in #764
    • perf: use Ternary() instead If().Else() in Range/RangeFrom by @d-enk in #770
    • perf: optimize it.Trim to use DropLastWhile(DropWhile(...)) by @d-enk in #780
    • perf: replace Min/Max(Range) with Min/MaxIndexBy in DispatchingStrategy by @d-enk in #779
    • perf: preallocate result slice in RangeWithSteps by @d-enk in #820
    • perf: avoid unnecessary error allocation in NthOr, NthOrEmpty by @d-enk in #817
    • perf: optimize Zip and ZipBy functions by @d-enk in #818
    • perf: lazy it.Reverse iteration instead of in-place mutation by @d-enk in #814
    • perf: optimize Substring to work directly with strings instead of converting to runes by @d-enk in #822
    • perf: optimize it.CountBy by removing Filter iterator chain by @d-enk in #813
    • perf: optimize it.Find to avoid unnecessary allocations by @d-enk in #811
    • perf: optimize it.ContainsBy/EveryBy/SomeBy/NoneBy to avoid unnecessary allocations by @d-enk in #812
    • refactor: simplify for loop by @d-enk in #772
    • refactor: remove some redundant checks by @d-enk in #771
    • refactor: simplify it.HasSuffix implementation by @d-enk in #767
    • refactor: improve Slice logic and fix docstring by @d-enk in #785

    Thanks @d-enk !!

    Other (doc, tests, style...)

    • test: adding missing test cases to ellipsis by @samber in #809
    • fix(test): Increase timeout values in concurrency tests by @samber in #775
    • refactor: reorganize llms.txt and add missing helpers by @samber in #723
    • Fix Clone() go playground link in README by @sethisernhagen in #761
    • Intersect CI test fix by @frankywahl in #731
    • lint: fix inconsistent callback function parameter names by @NathanBaulch in #730
    • style: fix linter by @samber in #802
    • fix: update Play links for Async functions in concurrency.go by @Weeranieb in #724
    • lint: use Keyify internally by @NathanBaulch in #691
    • Fix references to "lo" instead of "ro" by @pgr0ss in #713
    • style: reduce the number of files in root directory by @samber in #719
    • style: move img/ directory into docs/static/img by @samber in #721
    • refactor: use separate variables for each iter.Pull in it.Zip functions by @d-enk in #816
    • refactor: remove redundant map zero value initialization in throttleBy by @d-enk in #815
    • doc: explain chunkstring inconsistency by @samber in #789
    • doc: fix package name from "lo" to "it" by @samber in #794
    • doc(exp,simd): adding warning about API stability for code under exp/ by @samber in #808
    • doc(maxby): adding comment to explain inconsistency by @samber in #727
    • doc: adding some conventions for callback naming by @samber in #738
    • docs: fix typos by @alexandear in #745
    • chore(tests): some test improvements by @samber in #725
    • chore(ci): improve go version management in CI by @samber in #806
    • chore(ci): adding codeql by @samber in #819
    • style(simd): rename sse to avx by @samber in #821

    Dependencies

    • chore(deps): bump lodash from 4.17.21 to 4.17.23 in /docs by @dependabot[bot] in #777
    • chore(deps): bump webpack from 5.102.0 to 5.105.0 in /docs by @dependabot[bot] in #793
    • chore(deps): bump actions/setup-node from 5 to 6 by @dependabot[bot] in #716
    • chore(deps): bump marked from 16.3.0 to 16.4.1 in /docs by @dependabot[bot] in #717
    • chore(deps): bump js-yaml from 3.14.1 to 3.14.2 in /docs by @dependabot[bot] in #741
    • chore(deps): bump node-forge from 1.3.1 to 1.3.2 in /docs by @dependabot[bot] in #744
    • chore(deps): bump ajv from 6.12.6 to 6.14.0 in /docs by @dependabot[bot] in #807
    • chore(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #747
    • chore(deps): bump golangci/golangci-lint-action from 8 to 9 by @dependabot[bot] in #746
    • chore(deps): bump marked from 16.4.1 to 17.0.1 in /docs by @dependabot[bot] in #748
    • chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs by @dependabot[bot] in #750
    • chore(deps): bump express from 4.21.2 to 4.22.1 in /docs by @dependabot[bot] in #751

    New Contributors

    Full Changelog: v1.52.0...v1.53.0

    Open source →
    Release notes

    v1.53.0 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. v1.52.0 08 Oct 2025
    Release notes

    Thrilled to announce the latest release of samber/lo!

    This version brings major improvements:

    • A new it/ sub-package for everything related to the iter package added in Go 1.23. Big up to @NathanBaulch for its help on this
    • A new documentation -> lo.samber.dev
    • Lots of micro fixes and performance improvements
    • Better code quality with many more linters

    ✨ A good introduction to streams in Go !

    What's Changed

    Tests

    • fix(tests): fix flaky time-based tests by @samber in #699

    Style

    Documentation

    Other

    • chore(deps): bump actions/setup-go from 5 to 6 by @dependabot[bot] in #695
    • chore(deps): bump github.com/stretchr/testify from 1.11.0 to 1.11.1 by @dependabot[bot] in #663
    • chore(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #659
    • chore(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.0 by @dependabot[bot] in

    New Contributors

    Full Changelog: v1.51.0...v1.52.0

    Open source →
    Release notes

    v1.52.0

    Compare

    Choose a tag to compare

    Open source →
  3. v1.51.0 11 Jun 2025
    Release notes

    What's Changed

    • Fixed the error in the usage example of lo.Latest in readme.md by @ghosx in #627
    • feat(assertions): add Assert and Assertf by @your-diary in #638

    Doc

    • docs: Add a more precise description to the Ellipsis function by @mengxunQAQ in #635
    • docs: Fix description for LastOrEmpty and LastOr by @vaihtovirta in #636
    • docs: fix wrong variable name for mutable map example by @sunjayaali in #637

    Dependencies

    • fix(ci): correct cleanup deps - remove all *_test.go files using find by @d-enk in #630
    • Revert "chore(deps): bump golang.org/x/text from 0.22.0 to 0.24.0" by @samber in #626
    • chore(deps): bump golang.org/x/text from 0.22.0 to 0.24.0 by @dependabot in #625
    • chore(deps): bump golangci/golangci-lint-action from 7 to 8 by @dependabot in #628

    New Contributors

    Full Changelog: v1.50.0...v1.51.0

    Open source →
    Release notes

    v1.51.0

    Compare

    Choose a tag to compare

    Open source →
  4. v1.50.0 26 Apr 2025
    Release notes

    What's Changed

    Here is the 50th minor version !! 🔥🥂

    New methods

    Improvements

    • Perf(slice): Optimize iteration function parameters and add test cases by @shuqingzai in #587
    • Preallocate result in FilterMap by @renbou in #622

    Documentation

    Dependencies

    • chore(deps): bump golang.org/x/text from 0.21.0 to 0.22.0 by @dependabot in #590
    • chore(deps): bump golang.org/x/text from 0.22.0 to 0.24.0 by @dependabot in #618
    • chore(deps): bump golangci/golangci-lint-action from 6 to 7 by @dependabot in #616

    New Contributors

    Full Changelog: v1.49.1...v1.50.0

    Open source →
    Release notes

    v1.50.0

    Compare

    Choose a tag to compare

    Open source →
  5. v1.49.1 28 Jan 2025
    Release notes

    What's Changed

    • fix(product + productby): fix empty slice behavior by @samber in #584

    Full Changelog: v1.49.0...v1.49.1

    Open source →
    Release notes

    v1.49.1

    Compare

    Choose a tag to compare

    Open source →
  6. v1.49.0 27 Jan 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v1.48.0...v1.49.0

    Open source →
    Release notes

    v1.49.0

    Compare

    Choose a tag to compare

    Open source →
  7. v1.48.0 25 Jan 2025
    Release notes

    What's Changed

    Feature

    Fix

    • fix: change examples for MapKeys and MapValues by @luxcgo in #341
    • fix: order of GroupBy and PartitionBy by @liyishuai in #572

    Refactor

    New Contributors

    Full Changelog: v1.47.0...v1.48.0

    Open source →
    Release notes

    v1.48.0

    Compare

    Choose a tag to compare

    Open source →
  8. v1.47.0 13 Aug 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v1.46.0...v1.47.0

    Open source →
    Release notes

    v1.47.0

    Compare

    Choose a tag to compare

    Open source →
  9. v1.46.0 15 Jul 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v1.45.0...v1.46.0

    Open source →
    Release notes

    v1.46.0

    Compare

    Choose a tag to compare

    Open source →
  10. v1.45.0 13 Jul 2024
    Release notes

    What's Changed

    • perf: preallocate in Assign by @pmalek in #484
    • feat: adding EarliestBy and LatestBy functions by @timych in #489

    New Contributors

    Full Changelog: v1.44.0...v1.45.0

    Open source →
    Release notes

    v1.45.0

    Compare

    Choose a tag to compare

    Open source →
  11. v1.44.0 30 Jun 2024

    Nothing published for this version

  12. v1.43.0 28 Jun 2024

    Nothing published for this version

  13. v1.42.0 27 Jun 2024

    Nothing published for this version

  14. v1.41.0 27 Jun 2024

    Nothing published for this version

  15. v1.40.0 27 Jun 2024

    Nothing published for this version

  16. v1.39.0 02 Dec 2023

    Nothing published for this version

  17. v1.38.1 21 Mar 2023

    Nothing published for this version

  18. v1.38.1-0.20260813141442-f7288041fb4d 13 Aug 2026 pre-release

    Nothing published for this version

  19. v1.38.1-0.20260801043403-8d1aa4f84d58 01 Aug 2026 pre-release

    Nothing published for this version

  20. v1.38.1-0.20260731114825-1fd91245873b 31 Jul 2026 pre-release

    Nothing published for this version

  21. v1.38.1-0.20260726123345-b17aaeb2cd42 26 Jul 2026 pre-release

    Nothing published for this version

  22. v1.38.1-0.20260723142926-f75f39097da9 23 Jul 2026 pre-release

    Nothing published for this version

  23. v1.38.1-0.20260716083126-bb6e45518419 16 Jul 2026 pre-release

    Nothing published for this version

  24. v1.38.1-0.20260715124417-75efb922e2c4 15 Jul 2026 pre-release

    Nothing published for this version

  25. v1.38.1-0.20260714170044-42270bc1aeaf 14 Jul 2026 pre-release

    Nothing published for this version

  26. v1.38.1-0.20260713172409-029e81ad4e8a 13 Jul 2026 pre-release

    Nothing published for this version

  27. v1.38.1-0.20260712174528-fe8e20743cc3 12 Jul 2026 pre-release

    Nothing published for this version

  28. v1.38.1-0.20260711210748-c329d6698dc5 11 Jul 2026 pre-release

    Nothing published for this version

  29. v1.38.1-0.20260706173327-ea33bac8f859 06 Jul 2026 pre-release

    Nothing published for this version

  30. v1.38.1-0.20260704172218-ad892e5af5b5 04 Jul 2026 pre-release

    Nothing published for this version

  31. v1.38.1-0.20260701102407-42d2d9b95eb2 01 Jul 2026 pre-release

    Nothing published for this version

  32. v1.38.1-0.20260621174628-ac768285c795 21 Jun 2026 pre-release

    Nothing published for this version

  33. v1.38.1-0.20260617101251-ea070e8bc2c9 17 Jun 2026 pre-release

    Nothing published for this version

  34. v1.38.1-0.20260602070645-0875232f823b 02 Jun 2026 pre-release

    Nothing published for this version

  35. v1.38.1-0.20260524010610-7de2b0dae243 24 May 2026 pre-release

    Nothing published for this version

  36. v1.38.1-0.20260520161933-14daebc455cf 20 May 2026 pre-release

    Nothing published for this version

  37. v1.38.1-0.20260516194004-1e64f9953d5e 16 May 2026 pre-release

    Nothing published for this version

  38. v1.38.1-0.20260501101206-6f2b2bc81fce 01 May 2026 pre-release

    Nothing published for this version

  39. v1.38.1-0.20260426150613-b03f648970ed 26 Apr 2026 pre-release

    Nothing published for this version

  40. v1.38.1-0.20260423222020-87e4c51ef591 23 Apr 2026 pre-release

    Nothing published for this version

  41. v1.38.1-0.20260421235442-607514273b09 21 Apr 2026 pre-release

    Nothing published for this version

  42. v1.38.1-0.20260417180942-287e689e5b4b 17 Apr 2026 pre-release

    Nothing published for this version

  43. v1.38.1-0.20260401095311-891b429fa047 01 Apr 2026 pre-release

    Nothing published for this version

  44. v1.38.1-0.20260331124343-1467d6acbdce 31 Mar 2026 pre-release

    Nothing published for this version

  45. v1.38.1-0.20260325232314-a17e3ac88258 25 Mar 2026 pre-release

    Nothing published for this version

  46. v1.38.1-0.20260307231711-4d1dbfadf753 07 Mar 2026 pre-release

    Nothing published for this version

  47. v1.38.1-0.20260306161017-e9ad51b03a04 06 Mar 2026 pre-release

    Nothing published for this version

  48. v1.38.1-0.20260302150714-56ef3beaf8ad 02 Mar 2026 pre-release

    Nothing published for this version

  49. v1.38.1-0.20260226210853-ac8295b68aae 26 Feb 2026 pre-release

    Nothing published for this version

  50. v1.38.1-0.20260225195944-c49f84658a88 25 Feb 2026 pre-release

    Nothing published for this version

  51. v1.38.1-0.20260222042042-921fb6189334 22 Feb 2026 pre-release

    Nothing published for this version

  52. v1.38.1-0.20260216144242-34e2ec595d3a 16 Feb 2026 pre-release

    Nothing published for this version

  53. v1.38.1-0.20260127175730-b6d1bf3749be 27 Jan 2026 pre-release

    Nothing published for this version

  54. v1.38.1-0.20260122165120-d61098016adc 22 Jan 2026 pre-release

    Nothing published for this version

  55. v1.38.1-0.20260113103446-2859d7382fcd 13 Jan 2026 pre-release

    Nothing published for this version

  56. v1.38.1-0.20260112200333-775539002b20 12 Jan 2026 pre-release

    Nothing published for this version

  57. v1.38.1-0.20260108170700-eb9719c674ac 08 Jan 2026 pre-release

    Nothing published for this version

  58. v1.38.1-0.20260108012347-8590d84fcd7f 08 Jan 2026 pre-release

    Nothing published for this version

  59. v1.38.1-0.20260107203102-27e2842ca886 07 Jan 2026 pre-release

    Nothing published for this version

  60. v1.38.1-0.20260107162808-b6154d0f8d9a 07 Jan 2026 pre-release

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive