Commit Graph

310 Commits

Author SHA1 Message Date
Nathan Baulch 3e11f11781 docs: grammar improvements (#673)
* lint: pin golangci-lint version

* docs: grammar fixes

* docs: remove "truthy" terminology

* docs: remove "array" terminology

* docs: grammar fixes

* Update .github/workflows/lint.yml

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-09-24 20:59:41 +02:00
Samuel Berthe 7e6d6e0673 chore: remove docker - a lightweight project is beautiful 2025-09-24 16:22:38 +02:00
Samuel Berthe 3bc887c57c doc: adding go playground examples 2025-09-23 14:54:30 +02:00
Samuel Berthe 579fdad713 feat: adding FilterValues and fix FilterKeys signature (#661)
* feat: adding FilterValues and fix FilterKeys signature

* oops
2025-08-24 12:43:12 +02:00
mengxun b1a108d0d3 docs: Fix the Markdown syntax that is not displaying correctly (#658) 2025-08-12 16:51:21 +02:00
ghosx bededfed30 feature: add Mode function with tests and documentation (#644)
* Update README.md

Fixed the error in the usage example of lo.Latest in readme.md

use []time.Time{…} (value of type []time.Time) as time.Time value in argument to lo.Latest

* Update README.md

* feature: add Mode function with tests and documentation

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-07-07 02:05:39 +02:00
Samuel Berthe 49f24de919 style: merge assertion.go and errors.go 2025-06-01 16:19:29 +02:00
ynn e9281d8a66 feat(assertions): add Assert and Assertf (#638)
Co-authored-by: ynn <contact@your-diary.io>
2025-06-01 16:12:44 +02:00
Ali Sunjaya 2b57de74f4 docs: fix wrong variable name for mutable map example (#637) 2025-05-27 11:11:51 +02:00
Emil Shakirov f2cfb22748 docs: Fix description for LastOrEmpty and LastOr (#636) 2025-05-22 13:13:51 +02:00
mengxun f1dce8f5e7 docs: Add a more precise description to the Ellipsis function to prevent misunderstanding. (#635)
Signed-off-by: mengxun <mengxun1122@163.com>
2025-05-22 13:12:10 +02:00
ghosx 3a534ad9b4 Fixed the error in the usage example of lo.Latest in readme.md (#627)
* Update README.md

Fixed the error in the usage example of lo.Latest in readme.md

use []time.Time{…} (value of type []time.Time) as time.Time value in argument to lo.Latest

* Update README.md

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-05-03 22:22:59 +02:00
Samuel Berthe 7f3c0b84fd Update README.md 2025-04-26 19:43:12 +02:00
Samuel Berthe 4fdf4d1fe2 Update README.md 2025-04-26 19:35:20 +02:00
Oganes Mirzoyan 4a43ff68b4 Add ElementsMatch, ElementsMatchBy (#589)
* Add ElementsMatch, ElementsMatchBy

* Update intersect.go

* Update README.md

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-04-26 19:06:51 +02:00
Samuel Berthe 0bc568abfc Update README.md 2025-04-26 19:03:52 +02:00
Samuel Berthe c7a67cad51 feat(mutable): adding Map, MapI, Filter, FilterI (#577)
* feat(mutable): adding Map, MapI, Filter, FilterI

* Update README.md

* doc: add doc and examples for lom.Filter

* oops
2025-04-26 18:54:36 +02:00
Samuel Berthe e5dba6f459 feat: adding FilterMapToSlice (#623) 2025-04-26 18:13:17 +02:00
Oswaldo Montaño e343af088f docs: add play link for ChunkEntries example in README (#600)
* docs: add play link for ChunkEntries example in README

* Update map.go

---------

Co-authored-by: Oswaldo Montaño <oswaldo.montano.ext@diagroup.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-04-26 17:46:02 +02:00
Ahmed Ashraf 2bc3746616 fix typo in readme (#620) 2025-04-13 00:19:30 +02:00
Edvard 87553560d4 feat: Add NthOr and NthOrEmpty functions (#611)
* feat: Add NthOr and NthOrEmpty functions

This commit introduces two new functions, `NthOr` and `NthOrEmpty`, to the `find` package. These functions provide a safer way to access elements at a specific index in a slice, handling out-of-bounds scenarios gracefully.

- `NthOr`: Returns the element at the specified index or a provided fallback value if the index is out of bounds.
- `NthOrEmpty`: Returns the element at the specified index or the zero value for the slice's element type if the index is out of bounds.

* update readme
2025-03-17 00:13:20 +01:00
peterhoward42 17d82f463d fix: Issue 605 (README for Ternary() (#606)
* fix: Issue 605

* Add the Ternary comment from prev commit to function docstring
2025-03-04 21:25:46 +01:00
Jialei b828ea137f doc: update CoalesceXXX demo and result (#594) 2025-02-22 20:35:39 +01:00
shunsuke takii fe0618f731 docs: modify mutable example docs (#595)
docs: modify mutable example docs
2025-02-22 20:33:42 +01:00
Samuel Berthe ce12685a40 fix(groupbymap): remove second iteratee and add test+example+doc 2025-01-28 20:25:04 +01:00
JohnDevitt 1c1dfd9d29 feat: add Product and ProductBy functions (#566)
Co-authored-by: John.Devitt@cdp.net <JohnDevitt@Mac.cust.communityfibre.co.uk>
2025-01-27 01:02:11 +01:00
Samuel Berthe 124d3004de feat: adding FilterSliceToMap (#581) 2025-01-26 23:32:59 +01:00
Samuel Berthe 5cd32660f6 feat: adding ExampleNewThrottleBy and ExampleNewThrottleByWithCount 2025-01-26 22:47:39 +01:00
minjea.lee 27638ea5b7 feat: adding NewThrottle (#396) 2025-01-26 19:59:39 +01:00
Samuel Berthe 4a03b54ea4 rename ChunkMap to ChunkEntries 2025-01-26 19:38:33 +01:00
Xin Hao f1c337945a feat: Add IsNotNil (#523)
* Add IsNotNil

* Apply suggestions from code review

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-01-26 16:19:29 +01:00
Bram Van de Walle 86ce870075 feat: add SampleBy and SamplesBy (#516)
* Add SampleBy and SamplesBy

Co-authored-by: Bram Van de Walle <bram.vandewalle@otainsight.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-01-26 15:57:04 +01:00
Samuel Berthe 699707a0db feat(mutable): shuffle 2025-01-26 00:02:51 +01:00
Samuel Berthe 4201d6e342 doc 2025-01-25 23:43:47 +01:00
Samuel Berthe 33f7b14d1d Merge branch 'master' into nick-add-without-by 2025-01-25 23:40:21 +01:00
Samuel Berthe 27d2554396 fix: renaming SliceToSet to Keyify 2025-01-25 23:26:53 +01:00
nicklausliu dd2eaa966a feat: add README 2025-01-25 23:23:30 +01:00
Samuel Berthe bb32fc732f feat: adding lo.BufferWithContext (#580)
* feat: adding lo.BufferWithContext

* Add BufferWithContext to README table of contents
2025-01-25 22:46:36 +01:00
Samuel Berthe 677bfd183b feat: deprecate lo.Reverse and move it to lom.Reverse (#576) 2025-01-25 18:26:52 +01:00
Samuel Berthe 8e64522eb6 feat: adding WithoutNth (#575) 2025-01-25 18:18:48 +01:00
Samuel Berthe ab471406ed feat: adding CoalesceMap 2025-01-25 16:38:37 +01:00
Samuel Berthe 2876510f3c CrossJoinX + CrossJoinByX 2025-01-25 00:19:26 +01:00
Samuel Berthe c4ae516f73 fix doc 2025-01-24 23:04:38 +01:00
nicklaus-dev 5909b6b856 feat: add UniqMap (#527) 2025-01-24 23:04:38 +01:00
SnowOnion 3bc8722b6d docs: clarify Empty returns zero value (#543)
* docs: clarify `Empty` returns zero value

https://go.dev/ref/spec#The_zero_value does not define "empty value". It informally mentions "empty value", meaning (non-nil && 0-length) slice or map.

> Note that the zero value for a slice or map type is not the same as an initialized but empty value of the same type.

* docs: other "empty value" -> "zero value"

---------

Co-authored-by: xuanhong <litianchi@papegames.net>
2025-01-24 23:04:38 +01:00
Ali Sunjaya 337e739cd7 doc: fix go dev example code for FromSlicePtrOr (#544) 2025-01-24 23:04:38 +01:00
Aria 1d50016bca feat: add (Min|Max)Index(By) (#569) 2025-01-24 23:04:38 +01:00
John Devitt a2bed0c99c feat: add CrossJoin function 2024-12-07 13:09:24 +00:00
snamiki1212 407b62d3f1 docs: fix example README, add playground (FromSlicePtrOr) (#541)
* doc: update FromSlicePtrOr example in README

* doc: add playground for FromSlicePtrOr

* Update README.md

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-10-01 18:54:43 +02:00
GuyArye-RecoLabs fbc7f33e31 Update README.md (#537)
Makes more sense to check in the Some an example when some of the values are present but not every one of them
2024-09-19 23:54:29 +02:00