go-concurrency

Solid

Use when writing or reviewing Go concurrency — goroutines, channels, errgroup, context cancellation, or goroutine leaks. Not for sequential idioms (go-core-idioms).

AI & Automation 25 stars 4 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Covers Go concurrency for Go 1.26: goroutines and channels, golang.org/x/sync/errgroup, context propagation and cancellation, sync.WaitGroup vs channels, the -race detector, and diagnosing goroutine leaks (including the 1.26 goroutineleak profile). Does not cover sequential error handling, slog, generics, or interface style (see go-core-idioms), non-Go languages, or framework-specific code. </objective> # Go Concurrency Goroutines, channels, `context`, and `errgroup` for Go 1.26 — plus the number-one documented pitfall: **leaking goroutines on an unbuffered channel + early return.** ## Agent Workflow (MANDATORY) Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`: 1. **fuse-ai-pilot:explore-codebase** - Map existing goroutine/channel/context usage 2. **fuse-ai-pilot:research-expert** - Verify errgroup/context docs via Context7/Exa 3. **mcp__context7__query-docs** - Confirm `golang.org/x/sync/errgroup` signatures After implementation, run **fuse-ai-pilot:sniper** for validation, and run tests with `go test -race ./...`. --- ## Overview | Feature | Description | |---------|-------------| | **Goroutines & channels** | Lightweight concurrency + typed communication | | **errgroup** | Parallelism + error aggregation + context cancellation | | **context** | First param, propagated strictly, carries cancellation/deadline | | **WaitGroup vs channels** | Counting-only vs result/error passing | | **Race detector** | `-race` in ...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
6 days ago
Language
CSS
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category