samber
bbd44ff2a9
bump v1.47.0
v1.47.0
2024-08-13 13:23:52 +00:00
Samuel Berthe
da6eb9d678
💄 lint
2024-08-11 19:01:36 +02:00
Samuel Berthe
cd0bc21b88
preallocate stuff and more tests
2024-08-11 18:47:56 +02:00
Samuel Berthe
d9d3e3fb05
feat: preallocate output for lo.Keys and lo.Values
2024-08-11 18:28:42 +02:00
Sianao Luo
1603a848b0
Update foreachwhile readme.md ( #508 )
...
* update readme.md for lo.ForEachWhile play and example code
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-08-10 01:25:12 +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
Samuel Berthe
cb150f5d38
feat: adding FromSlicePtrOr ( #506 )
2024-07-26 07:56:32 +02:00
Masakazu Ohtsuka
aa609e4f47
feat: add FromSlicePtr ( #217 )
...
* feat: add FromSlicePtr
* Update README.md
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-07-26 07:51:40 +02:00
YAMAMORI, Akihiro
df28bdd91b
Fix documentation for Duration3 ( #502 )
...
Duration3 needs 4 assignments to call.
To match`TryOf` documentation, `str, nbr, err, duration` names are used for the assignments.
2024-07-21 19:18:48 +02:00
ColeC
6ade78cf90
Docs: Wrong method reference and output in readme ( #497 )
2024-07-17 19:09:40 +02:00
mr
1ca9c7b4e5
Update string.go ( #496 )
...
* Update string.go
more reasonable
* test
2024-07-17 19:08:46 +02:00
Samuel Berthe
f6f43fb884
lint 💄
2024-07-15 19:37:47 +02:00
Sianao Luo
cbfd1c6286
add ForEachCondition implement ( #485 )
...
* add ForEachCondition implement
* add example and test code
* rename ForEachCondition() to ForEachWhile()
* update test and example code
* rename ExampleForForEachWhile() to ExampleForEachWhile()
2024-07-15 19:28:57 +02:00
ccoVeille
0f4679bf52
feat: add WaitForWithContext ( #480 )
...
* chore: fix test timeout helper
using os.Exit(1) kills everything, tests statuses are not always displayed
* chore: refactor WaitFor unit tests
zero-code changes
* fix: WaitFor on first condition
duration must be non-zero if first conditions is true
* feat: add WaitForWithContext
* chore: provide meaningful returned values for WaitFor and WaitForWithContext
2024-07-15 19:25:42 +02:00
Mihir Gandhi
9e343973a4
fix: chunk memory leak ( #491 )
2024-07-15 19:16:03 +02:00
Timur Polukeev
34537d5291
feat: adding EarliestBy and LatestBy functions ( #489 )
2024-07-13 16:41:15 +02:00
Samuel Berthe
d93dd9a2d7
fix: Dockerfile to reduce vulnerabilities ( #487 )
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-PYTHON311-3325304
- https://snyk.io/vuln/SNYK-DEBIAN12-PYTHON311-3325304
- https://snyk.io/vuln/SNYK-DEBIAN12-PYTHON311-5853785
- https://snyk.io/vuln/SNYK-DEBIAN12-SYSTEMD-6277507
- https://snyk.io/vuln/SNYK-DEBIAN12-SYSTEMD-6277507
Co-authored-by: snyk-bot <snyk-bot@snyk.io >
2024-07-04 08:32:21 +02:00
Samuel Berthe
8d3ddcfa82
Update README.md
2024-07-02 13:56:11 +02:00
Patryk Małek
57c2d6d4ea
perf: preallocate in Assign ( #484 )
2024-06-30 14:40:46 +02:00
Samuel Berthe
3b29b7d918
feat: upgrade to math/rand/v2 ( #483 )
...
* feat: upgrade to math/rand/v2
* lint: silent warning
2024-06-30 03:54:55 +02:00
Samuel Berthe
0a145c7cc7
style: replace interface{} by any
2024-06-30 03:34:15 +02:00
Samuel Berthe
9405c90405
chore: adding issue template ( #481 )
2024-06-30 02:18:13 +02:00
Owen Gong
52e17faeec
Added DropByIndex helper for slice ( #398 )
...
* added DropByIndex helper
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-06-30 00:38:34 +02:00
Samuel Berthe
93686db8b5
feat: preserve type alias of slices and maps (see #365 )
2024-06-30 00:08:47 +02:00
Samuel Berthe
3ba93a16cc
feat: preserve type alias of slices and maps (see #365 )
2024-06-30 00:04:08 +02:00
Felipe Gasper
de419c7571
Make Filter() preserve type. ( #365 )
...
* Update slice.go
* add test
2024-06-29 23:33:19 +02:00
Samuel Berthe
2ec43f41f4
Revert "Add new method Concat ( #376 )" ( #479 )
...
This reverts commit 940ded8b03
.
2024-06-29 22:41:09 +02:00
Jason Zhang
940ded8b03
Add new method Concat ( #376 )
...
* Add new method Concat
---------
Co-authored-by: Zhang Jie (Jason) <jie.zhang@grabtaxi.com >
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-06-29 21:53:58 +02:00
wick
fe16ff7d23
Add slice Splice an element or multiple elements at index i. ( #371 )
...
* Add slice Splice an element or multiple elements at index i.
* Update README.md
* Update slice.go
* Update slice.go
* Update README.md
* Update slice_test.go
---------
Co-authored-by: wenlingang <lingang.wen@longbridge.sg >
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-06-29 20:25:42 +02:00
Trim21
42a90a0c7b
remove golang.org/x/exp
since it doesn't follow go 1 compatibility promise ( #478 )
...
* fix
* mod tidy
* remove test
* redirect cmp.Ordered
* fix
* fix
* fix
2024-06-29 18:03:44 +02:00
Samuel Berthe
89ca7c6e61
fix tests
2024-06-28 22:03:04 +02:00
Samuel Berthe
263c266328
Adding lo.WaitFor ( #269 )
...
* feat(concurrency): adding lo.WaitFor
2024-06-28 22:00:52 +02:00
Samuel Berthe
33853f5d82
feat: adding HasKey ( #477 )
...
* feat: adding HasKey
2024-06-28 21:53:35 +02:00
Milo
7cce15b3d5
perf: Optimize the performance of union method, avoid repeated expansion ( #397 )
...
Co-authored-by: 逍遥 <caowenbo@shizhuang-inc.com >
2024-06-28 19:24:57 +02:00
Samuel Berthe
07e3675115
fix: Dockerfile to reduce vulnerabilities ( #476 )
...
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN11-GLIBC-5927133
- https://snyk.io/vuln/SNYK-DEBIAN11-GLIBC-5927133
- https://snyk.io/vuln/SNYK-DEBIAN11-GLIBC-5927133
- https://snyk.io/vuln/SNYK-DEBIAN11-GLIBC-5927133
- https://snyk.io/vuln/SNYK-DEBIAN11-NGHTTP2-5953384
Co-authored-by: snyk-bot <snyk-bot@snyk.io >
2024-06-28 18:26:20 +02:00
Samuel Berthe
61209816d1
feat: speed up loops by reducing allocations ( #475 )
2024-06-28 01:35:57 +02:00
guanming
a966a64cc6
Refactor Contains function to improve performance by using index iteration over collection ( #428 )
...
Co-authored-by: 关明 <guanming@ziipin.com >
2024-06-28 01:04:51 +02:00
Taehyung Lee
0f865a30f8
fix README.md. same meaning but different expression in comment of Unpack2 ( #406 )
2024-06-28 01:00:38 +02:00
Samuel Berthe
9f52970974
fix readme
2024-06-28 00:47:55 +02:00
Samuel Berthe
5aa64ef280
feat: adding LastOrEmpty and LastOr ( #474 )
2024-06-28 00:46:42 +02:00
Alireza Kiani
a94098f9b0
Add First and FirstOrZeroValue functions ( #451 )
...
* feat: add first and firstOrZeroValue functions
* doc: update readme for First and FirstOrZeroValue functions
* feat: follow convention for return items and reuse base First function and add FirstOr
* doc: update documentation for First methods
2024-06-28 00:39:16 +02:00
Gustavo Okuyama
c4d8094a42
feat(type_manipulation): add Nil ( #383 )
...
Co-authored-by: Gustavo Okuyama <gustavo.okuyama@ifood.com.br >
2024-06-27 23:38:37 +02:00
Samuel Berthe
0efce40cf0
lint
2024-06-27 21:05:31 +02:00
Samuel Berthe
ce9dfb2dad
Update lint.yml
2024-06-27 20:40:11 +02:00
Samuel Berthe
80bb7cefc6
feat: adding RejectMap ( #473 )
2024-06-27 16:17:40 +02:00
Samuel Berthe
91b5d9480e
feat: adding FilterReject ( #472 )
2024-06-27 16:12:34 +02:00
Samuel Berthe
20468b731a
feat: adding duration ( #471 )
2024-06-27 16:11:07 +02:00
Samuel Berthe
c23c040774
feat: adding Earliest and Latest ( #468 )
2024-06-27 15:42:18 +02:00
Samuel Berthe
9999d6b13d
feat: adding CoalesceOrEmpty ( #469 )
2024-06-27 15:42:12 +02:00
Samuel Berthe
e5e4f028e4
feat: adding Elipse ( #470 )
2024-06-27 15:42:03 +02:00