50 Commits

Author SHA1 Message Date
Samuel Berthe 6a9f881ae1 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe 72a33aa397 feat: adding FilterKeysErr + FilterValuesErr helpers 2026-03-02 16:06:51 +01:00
Samuel Berthe 693e1ce3a8 feat: adding FilterMapToSliceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 5163ac211e fix: fix flaky test 2026-03-02 16:06:51 +01:00
Samuel Berthe cd78292882 💄 2026-03-02 16:06:51 +01:00
Samuel Berthe 788fb2997c feat: adding OmitByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 2fac7c49dd feat: adding PickByErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe 993b074a87 feat: adding MapToSliceErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe f69cbe70f1 feat: adding MapEntiesErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe b1263d4a41 feat: adding MapValuesErr helper 2026-03-02 16:06:51 +01:00
Samuel Berthe d4146ceb18 feat: adding MapKeysErr helper 2026-03-02 16:06:51 +01:00
Nathan Baulch f5aac81cc0 lint: enable gofumpt extra rules (#690)
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-09-26 13:32:59 +02:00
Nathan Baulch 1b92b5c7db lint: enable 7 more linters (#686)
* lint: enable and fix perfsprint issues

* lint: enable and fix nolintlint issues

* lint: enable and fix godot issues

* lint: enable and fix thelper issues

* lint: enable and fix tparallel issues

* lint: enable and fix paralleltest issues

* lint: enable and fix predeclared issues
2025-09-25 13:18:25 +02:00
Nathan Baulch 3210326df6 chore: minor whitespace fixes (#677)
* lint: pin golangci-lint version

* chore: minor whitespace fixes

* lint: enable whitespace linter

* Apply suggestions from code review

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-09-24 22:48:54 +02:00
Nathan Baulch 7170719ec0 lint: unit test improvements (#674)
* lint: pin golangci-lint version

* lint: use is.Empty where possible

* lint: use is.ElementsMatch for unsorted slices

* lint: remove redundant is.Len assertions

* lint: use is.Zero to assert zero structs

* fix: misc assertion issues

* lint: more consistent test case pattern

* fix: reversed expect/actual assert values

* lint: use is.ErrorIs and is.EqualError for errors

* Update golangci-lint version in workflow

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-09-24 21:02:52 +02:00
Nathan Baulch b5e290abe0 fix: more consistent panic strings (#678)
* lint: pin golangci-lint version

* fix: more consistent panic strings

* Update golangci-lint version in workflow

Updated golangci-lint action version to v2.4.

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-09-24 21:02:02 +02:00
Samuel Berthe 9c8308ffda Style add golangci config (#670)
* style(lint): gofumpt

* style(lint): errcheck

* style(lint): revive

* style(lint): gocritic

* style(lint): forcetypeassert

* style(lint): add .golangci.yml

* oops
2025-09-20 01:37:51 +02:00
Nathan Baulch 76b76a7adb lint: Apply testifylint linter recommendations (#669) 2025-09-20 00:50:00 +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
Rasha 7ccf4aadc4 add FilterKeys (#631) 2025-08-24 12:31:42 +02:00
Samuel Berthe e5dba6f459 feat: adding FilterMapToSlice (#623) 2025-04-26 18:13:17 +02:00
Samuel Berthe 4a03b54ea4 rename ChunkMap to ChunkEntries 2025-01-26 19:38:33 +01:00
Samuel Berthe cd0bc21b88 preallocate stuff and more tests 2024-08-11 18:47:56 +02:00
shivam-bhalla d8e5707487 Keys+Values: accept multiple maps (vaargs) - Adding UniqKeys+UniqValues (#503)
* added Keys: accept multiple maps (vaargs)

* added test:review comment fix

* added sort before asserting :review comment fix

* added sort before asserting :review comment fix

* output unique keys

* added map functions"

* added map_test.go and README.md

* added anchor in README.md

* added breakline in README.md

* fix README.md

* fix README.md and added test

* fix comments

* fix comments

* fix comments

* fix comments

* fix comments

* Update README.md

* small typo

* Update README.md

* Update README.md

* Update map.go

* Update map_test.go

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-07-29 05:37:41 +02:00
Patryk Małek 57c2d6d4ea perf: preallocate in Assign (#484) 2024-06-30 14:40:46 +02:00
Samuel Berthe 3ba93a16cc feat: preserve type alias of slices and maps (see #365) 2024-06-30 00:04:08 +02:00
Samuel Berthe 33853f5d82 feat: adding HasKey (#477)
* feat: adding HasKey
2024-06-28 21:53:35 +02:00
Eric Leblanc 9f99f74053 Use map indexing to speed up PickByKeys and OmitByKeys (#447) 2024-06-26 12:31:24 +02:00
Samuel Berthe f3826f79fd lint 2023-03-20 15:06:23 +01:00
Alexandre Lamarre fd5561abb3 feat : adding ValueOr (#295) 2023-02-20 02:47:59 +01:00
VictorAssunc 640e00c286 chore: test coverage improvement (#240)
* chore: improves channel functions test coverage

* chore: improves errors functions test coverage

* chore: improves map functions test coverage

* chore: improves parallel slice functions test coverage

* chore: improves slice functions test coverage

* fix: uses atomic counter on parallel/slice_test

* Update channel_test.go

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-10-22 19:05:07 +02:00
Samuel Berthe aca846b80d doc: improve doc for lo.MapEntries 2022-10-10 21:41:39 +02:00
Hugo a28cc0b583 feat: Add MapEntries function (#216)
* feat: add MapEntries method

* fix: add out key type

* doc: add MapEntries doc

* test: change MapEntries test format

* fix: simplify MapEntries iteratee

* doc: fix MapEntries doc

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2022-10-10 21:33:49 +02:00
Samuel Berthe 31f3bc3a85 test: parallel tests everywhere (#228) 2022-10-02 21:38:26 +02:00
Samuel Berthe bccfe8cda9 BREAKING: swap argument of MapToSlice iteratee 2022-07-29 11:49:01 +02:00
sleagon f2175ff5c2 feat: add MapToSlice method (#157)
Change-Id: I97d3e58ddc36e65231e5e76dc9239aa52a4a7613
2022-07-24 22:04:55 +02:00
lu4p 305f565368 remove unnecessary explicit typeparams (#134) 2022-05-11 13:10:36 +02:00
Samuel Berthe fa3e0d03d9 feat: adding PickBy+PickByValues+OmitBy+OmitByKeys+OmitByValues 2022-04-14 20:27:59 +02:00
Samuel Berthe c97ec3bdf3 Merge pull request #62 from metalrex100/feature/add-values-filtered-helper
[Feature]: Added ValuesF helper
2022-04-14 20:18:04 +02:00
Anatoly Ibragimov 29a0704762 Changed PickByKeys helper logic to return same map type instead of slice 2022-04-14 11:29:06 +02:00
Anatoly Ibragimov 0ed7583ceb ValuesF helper renamed to PickByKeys 2022-04-13 21:44:04 +02:00
Samuel Berthe cf11153875 feat: adding Clamp 2022-04-12 21:58:28 +02:00
Samuel Berthe ea93273806 feat: adding MapKeys 2022-04-12 21:33:56 +02:00
Samuel Berthe 4a2c77a829 feat: adding Invert 2022-04-12 21:26:25 +02:00
Anatoly Ibragimov 279689f73f Added ValuesF helper 2022-03-22 17:02:11 +03:00
Yusuke Yajima dc04f2d1fd Add MapValues 2022-03-08 14:46:51 +09:00
francisco souza 770dff269b Fix flaky test 2022-03-05 18:26:37 -05:00
Samuel Berthe 98ecdea940 adding Sample+Samples 2022-03-05 23:13:18 +01:00
retornam f51ff12ef3 use EqualValues for map tests
maps are unorderd thus using EqualValues which
asserts that two objects are equal or
convertable to the same types and equal, is a
better option than Equal.
2022-03-04 15:11:02 -08:00
Samuel Berthe 74b7c77702 Initial commit 2022-03-02 13:52:01 +01:00