Go: Update module github.com/samber/lo to v1.53.0
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| github.com/samber/lo | require | minor | v1.52.0 -> v1.53.0 |
⚠️ WarningSome dependencies could not be looked up. Check the Dependency Dashboard for more information.
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
Release Notes
samber/lo (github.com/samber/lo)
v1.53.0
Announcing the latest release of lo with lots of good gifts!
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
*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
simdsub-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 https://github.com/samber/lo/pull/801
- feat: adding Error variants: MapErr, FlatMapErr, ReduceErr... by @samber in https://github.com/samber/lo/pull/823
- feat: support for buffer iterator by @mimol91 in https://github.com/samber/lo/pull/824
- feat: add Take, TakeWhile, FilterTake, Window, and Sliding functions by @juliazadorozhnaya in https://github.com/samber/lo/pull/760
- feat: add a Concat slice function. by @FGasper in https://github.com/samber/lo/pull/714
- feat: add iterator slice helpers by @juliazadorozhnaya in https://github.com/samber/lo/pull/791
- feat(it): adding loit.Concat by @samber in https://github.com/samber/lo/pull/722
- feat: Allow Union/Intersect to take many lists by @frankywahl in https://github.com/samber/lo/pull/181
- feat: Add Clone function to return shallow copy of slice collections by @quexer in https://github.com/samber/lo/pull/732
- feat: IntersectBy by @ghosx in https://github.com/samber/lo/pull/653
- feat: Support Custom Assert by @RelicOfTesla in https://github.com/samber/lo/pull/755
- feat: Must support Custom error handler. by @RelicOfTesla in https://github.com/samber/lo/pull/752
- feat: WithoutNth handle non-comparable types by @urisimchoni in https://github.com/samber/lo/pull/774
- refactor: remove unnecessary type arguments in
NewThrottleby @d-enk in https://github.com/samber/lo/pull/773 - refactor: lo.IntersectBy + adding loit.IntersectBy + adding doc by @samber in https://github.com/samber/lo/pull/739
- fix: rename IsSortedByKey to IsSortedBy by @NathanBaulch in https://github.com/samber/lo/pull/735
- fix(iter/tuples): support break iteration over Zip[By] seq by @d-enk in https://github.com/samber/lo/pull/757
- fix(it.Mode): align behavior with lo.Mode and ensure consistent slice… by @intojhanurag in https://github.com/samber/lo/pull/711
- fix: improve Clone function to preserve nilness and avoid liveness issues by @quexer in https://github.com/samber/lo/pull/740
- fix: reset n counter per iteration in it.Replace by @LikimiaD in https://github.com/samber/lo/pull/799
- fix: make Ellipsis operate on runes instead of bytes to prevent Unicode truncation by @veeceey in https://github.com/samber/lo/pull/796
- fix: correct
DropByIndexhandling of negative indices out of bounds by @d-enk in https://github.com/samber/lo/pull/778
Deprecation
- refactor: remove helpers deprecated for more than 3y by @samber in https://github.com/samber/lo/pull/810
Performance improvements
- feat: Optimize UniqMap to reduce unnecessary slice preallocation by @ivolkoff in https://github.com/samber/lo/pull/710
- refactor(it): simplify DropLast, TrimSuffix, TrimPrefix and use range loops by @d-enk in https://github.com/samber/lo/pull/782
- bench: fix iterators to actually iterate in benchmarks by @d-enk in https://github.com/samber/lo/pull/781
- refactor: simplify slice cut/trim prefix/suffix functions by @d-enk in https://github.com/samber/lo/pull/787
- perf: optimize Sliding by pre-allocating result capacity by @d-enk in https://github.com/samber/lo/pull/783
- refactor: improve SamplesBy performance and revert non-panic behavior for negative count by @d-enk in https://github.com/samber/lo/pull/786
- feat(perf): speed up some functions with linear complexity O=n2 -> O=2n by @samber in https://github.com/samber/lo/pull/726
- perf: only allocate a single map in Intersect by @NathanBaulch in https://github.com/samber/lo/pull/736
- perf: preallocate Words string buffer by @NathanBaulch in https://github.com/samber/lo/pull/728
- refactor: improve lo[it].Intersect[By] readability and performance by @d-enk in https://github.com/samber/lo/pull/756
- perf: preallocate result slice in
SamplesByby @d-enk in https://github.com/samber/lo/pull/766 - perf: optimize
PartitionByby eliminating redundant append by @d-enk in https://github.com/samber/lo/pull/765 - perf: correct prealloc of the result in
FindUniques/Duplicates[By]by @d-enk in https://github.com/samber/lo/pull/764 - perf: use
Ternary()insteadIf().Else()inRange/RangeFromby @d-enk in https://github.com/samber/lo/pull/770 - perf: optimize it.Trim to use DropLastWhile(DropWhile(...)) by @d-enk in https://github.com/samber/lo/pull/780
- perf: replace Min/Max(Range) with Min/MaxIndexBy in DispatchingStrategy by @d-enk in https://github.com/samber/lo/pull/779
- perf: preallocate result slice in RangeWithSteps by @d-enk in https://github.com/samber/lo/pull/820
- perf: avoid unnecessary error allocation in NthOr, NthOrEmpty by @d-enk in https://github.com/samber/lo/pull/817
- perf: optimize Zip and ZipBy functions by @d-enk in https://github.com/samber/lo/pull/818
- perf: lazy it.Reverse iteration instead of in-place mutation by @d-enk in https://github.com/samber/lo/pull/814
- perf: optimize Substring to work directly with strings instead of converting to runes by @d-enk in https://github.com/samber/lo/pull/822
- perf: optimize it.CountBy by removing Filter iterator chain by @d-enk in https://github.com/samber/lo/pull/813
- perf: optimize it.Find to avoid unnecessary allocations by @d-enk in https://github.com/samber/lo/pull/811
- perf: optimize it.ContainsBy/EveryBy/SomeBy/NoneBy to avoid unnecessary allocations by @d-enk in https://github.com/samber/lo/pull/812
- refactor: simplify for loop by @d-enk in https://github.com/samber/lo/pull/772
- refactor: remove some redundant checks by @d-enk in https://github.com/samber/lo/pull/771
- refactor: simplify
it.HasSuffiximplementation by @d-enk in https://github.com/samber/lo/pull/767 - refactor: improve Slice logic and fix docstring by @d-enk in https://github.com/samber/lo/pull/785
Thanks @d-enk !!
Other (doc, tests, style...)
- test: adding missing test cases to ellipsis by @samber in https://github.com/samber/lo/pull/809
- fix(test): Increase timeout values in concurrency tests by @samber in https://github.com/samber/lo/pull/775
- refactor: reorganize llms.txt and add missing helpers by @samber in https://github.com/samber/lo/pull/723
- Fix Clone() go playground link in README by @sethisernhagen in https://github.com/samber/lo/pull/761
- Intersect CI test fix by @frankywahl in https://github.com/samber/lo/pull/731
- lint: fix inconsistent callback function parameter names by @NathanBaulch in https://github.com/samber/lo/pull/730
- style: fix linter by @samber in https://github.com/samber/lo/pull/802
- fix: update Play links for Async functions in concurrency.go by @Weeranieb in https://github.com/samber/lo/pull/724
- lint: use Keyify internally by @NathanBaulch in https://github.com/samber/lo/pull/691
- Fix references to "lo" instead of "ro" by @pgr0ss in https://github.com/samber/lo/pull/713
- style: reduce the number of files in root directory by @samber in https://github.com/samber/lo/pull/719
- style: move img/ directory into docs/static/img by @samber in https://github.com/samber/lo/pull/721
- refactor: use separate variables for each iter.Pull in it.Zip functions by @d-enk in https://github.com/samber/lo/pull/816
- refactor: remove redundant map zero value initialization in throttleBy by @d-enk in https://github.com/samber/lo/pull/815
- doc: explain chunkstring inconsistency by @samber in https://github.com/samber/lo/pull/789
- doc: fix package name from "lo" to "it" by @samber in https://github.com/samber/lo/pull/794
- doc(exp,simd): adding warning about API stability for code under exp/ by @samber in https://github.com/samber/lo/pull/808
- doc(maxby): adding comment to explain inconsistency by @samber in https://github.com/samber/lo/pull/727
- doc: adding some conventions for callback naming by @samber in https://github.com/samber/lo/pull/738
- docs: fix typos by @alexandear in https://github.com/samber/lo/pull/745
- chore(tests): some test improvements by @samber in https://github.com/samber/lo/pull/725
- chore(ci): improve go version management in CI by @samber in https://github.com/samber/lo/pull/806
- chore(ci): adding codeql by @samber in https://github.com/samber/lo/pull/819
- style(simd): rename sse to avx by @samber in https://github.com/samber/lo/pull/821
Dependencies
- chore(deps): bump lodash from 4.17.21 to 4.17.23 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/777
- chore(deps): bump webpack from 5.102.0 to 5.105.0 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/793
- chore(deps): bump actions/setup-node from 5 to 6 by @dependabot[bot] in https://github.com/samber/lo/pull/716
- chore(deps): bump marked from 16.3.0 to 16.4.1 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/717
- chore(deps): bump js-yaml from 3.14.1 to 3.14.2 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/741
- chore(deps): bump node-forge from 1.3.1 to 1.3.2 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/744
- chore(deps): bump ajv from 6.12.6 to 6.14.0 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/807
- chore(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/samber/lo/pull/747
- chore(deps): bump golangci/golangci-lint-action from 8 to 9 by @dependabot[bot] in https://github.com/samber/lo/pull/746
- chore(deps): bump marked from 16.4.1 to 17.0.1 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/748
- chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/750
- chore(deps): bump express from 4.21.2 to 4.22.1 in /docs by @dependabot[bot] in https://github.com/samber/lo/pull/751
New Contributors
- @ivolkoff made their first contribution in https://github.com/samber/lo/pull/710
- @intojhanurag made their first contribution in https://github.com/samber/lo/pull/711
- @pgr0ss made their first contribution in https://github.com/samber/lo/pull/713
- @Weeranieb made their first contribution in https://github.com/samber/lo/pull/724
- @frankywahl made their first contribution in https://github.com/samber/lo/pull/181
- @quexer made their first contribution in https://github.com/samber/lo/pull/732
- @alexandear made their first contribution in https://github.com/samber/lo/pull/745
- @juliazadorozhnaya made their first contribution in https://github.com/samber/lo/pull/760
- @sethisernhagen made their first contribution in https://github.com/samber/lo/pull/761
- @RelicOfTesla made their first contribution in https://github.com/samber/lo/pull/755
- @urisimchoni made their first contribution in https://github.com/samber/lo/pull/774
- @LikimiaD made their first contribution in https://github.com/samber/lo/pull/799
- @veeceey made their first contribution in https://github.com/samber/lo/pull/796
Full Changelog: https://github.com/samber/lo/compare/v1.52.0...v1.53.0
Configuration
- If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.