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
- fix(chunk): Copy chunk in a new slice by @samber in #648
- fix(zipx): fix the max length calculation by @samber in #649
- fix(retry): fix potential race condition in debounce callback by @samber in #650
- feature: add Mode function with tests and documentation by @ghosx in #644
- add FilterKeys for map by @rasha108bik in #631
- feat: adding FilterValues and fix FilterKeys signature by @samber in #661
#662 - fix: more consistent panic strings by @NathanBaulch in #678
- fix: minor example issues by @NathanBaulch in #676
- feat: preserve type alias in DropByIndex and WithoutBy by @NathanBaulch in #675
- feat: adding hassuffix + hasprefix by @samber in #680
- Added Cut, CutPrefix, CutSuffix by @xelavopelk in #666
- Add TrimXXX helpers by @samber in #683
- fix(string): fix division by zero by @samber in #684
- fix: avoid recover() if possible by @NathanBaulch in #685
- fix: panic when passing -1 to Drop by @NathanBaulch in #688
- perf: avoid Keyify twice in Trim by @NathanBaulch in #689
- feat: new iter package by @NathanBaulch in #672
- feat: from slice to map with index passed by @mabrarov in #697
- feat: from slice/iterator to map with index passed by @mabrarov in #698
- feat(generator): deprecate lo.Generator in favor of go "iter" package by @samber in #700
- perf: optimization of map access by @mabrarov in #692
- perf: optimize map access everywhere by @NathanBaulch in #693
Tests
Style
- lint: unit test improvements by @NathanBaulch in #674
- lint: fix CI warnings and avoid named return parameters by @NathanBaulch in #682
- lint: enable 7 more linters by @NathanBaulch in #686
- lint: enable gofumpt extra rules by @NathanBaulch in #690
- Style/rename internal rand by @samber in #701
- lint: Apply testifylint linter recommendations by @NathanBaulch in #669
- Style add golangci config by @samber in #670
- chore: minor whitespace fixes by @NathanBaulch in #677
Documentation
- New documentation for "lo" 🎨 by @samber in #703
- doc: add it/mutable/parallel sub-package to llms.txt by @samber in #707
- docs: lots of various doc improvements by @samber in #706
- docs: adding go playground examples to it/ package by @samber in #708
- docs: Fix the Markdown syntax that is not displaying correctly by @mengxunQAQ in #658
- doc: add examples for find.go by @samber in #681
- docs: Fix Product and ProductBy documentation by @markhildreth-gravity in #647
- chore(deps-dev): bump typescript from 5.6.3 to 5.9.3 in /docs by @dependabot[bot] in #704
- docs: grammar improvements by @NathanBaulch in #673
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
- @markhildreth-gravity made their first contribution in #647
- @rasha108bik made their first contribution in #631
- @xelavopelk made their first contribution in #666
- @mabrarov made their first contribution in #692
Full Changelog: v1.51.0...v1.52.0