Exemple
Run concurrent work with a bound and the first error with errgroup
sha256:fee4a8483e88e2109447b1f697e91dfbe81d19cfec3d5762d0d36b84547e9714
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Run concurrent work with a bound and the first error with errgroup HOW
- Paquets
- golang.org/x/sync 0.22.0
- Environnement
- go 1.26
- Créé
- 2026-08-13T15:47:36Z
Contrat
- run tasks through an errgroup with SetLimit
- assert concurrency never exceeded the limit
- assert Wait returns the first error
- assert the group context is canceled once a task fails
Fichiers
- csx.json
- go.mod
- go.sum
- src/run.go
- test/main.go
Seeder d'origine
Reçus de vérification
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · go@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · go@1 · 2026-08-13 · ed25519:7da3f610facce8bf