18 Commits

Author SHA1 Message Date
Nathan Baulch e7386d9246 lint: fix inconsistent callback function parameter names (#730)
* Fix linting

* Use is.ElementsMatch

This will ignore the ordering of the final intersection. Especially
important when checking old versions of go that do not guarantee an order
when iterating through maps.

* lint: fix inconsistent callback function parameter names

* lint: rename "iteratee" to "transform" for *Map helpers

* lint: rename "project" parameters to "transform"

* lint: rename "cb" parameters to "callback"

* lint: rename "iteratee" to "callback" for ForEach helpers

---------

Co-authored-by: Franky W. <frankywahl@users.noreply.github.com>
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2025-11-06 18:05:11 +01:00
Weerachai Panthueng a2f72cce17 fix: update Play links for Async functions in concurrency.go (#724)
Co-authored-by: Weerachai Panthueng <weerachai.panthueng@gmail.com>
2025-11-05 17:31:24 +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 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 3bc887c57c doc: adding go playground examples 2025-09-23 14:54:30 +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
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
Samuel Berthe 263c266328 Adding lo.WaitFor (#269)
* feat(concurrency): adding lo.WaitFor
2024-06-28 22:00:52 +02:00
d-enk 05a9bc93bd style: no extra any type parameter (#429) 2024-06-27 13:43:43 +02:00
Samuel Berthe 4a453a4131 fix: Async and AsyncX now returns read-only channels 2023-03-20 18:40:19 +01:00
Jille Timmermans 56ef8fe8a3 Fix goroutine leak in Async (#319)
All Async* functions should use a buffered channel, so the spawned goroutine can always write its value to the channel even if there is no reader. This allows the goroutine to exit, and the channel to be garbage collected.
2023-03-20 16:41:56 +01:00
Samuel Berthe 5781b44b25 Revert "feat(concurrency): adding lo.WaitFor"
This reverts commit 2f6f28e6fc.
2022-11-15 18:59:03 +01:00
Samuel Berthe 2f6f28e6fc feat(concurrency): adding lo.WaitFor 2022-11-15 18:58:28 +01:00
Samuel Berthe 8de4bb79ac Adding lo.Synchronize() 2022-05-02 14:43:22 +02:00
CorentinClabaut 13730306af Add Async2-6 returning tuple inside the channel 2022-04-26 15:56:41 +02:00
CorentinClabaut be2c4dc218 PR Update 2022-04-26 11:24:04 +02:00
CorentinClabaut add3bb15df Add Async{0-1} to be able to handle function with no return 2022-04-26 09:59:37 +02:00
CorentinClabaut 5debabe433 Implements Async
closes #85
2022-04-04 12:11:34 +02:00