# error: go vet: assignment copies lock value: sync.WaitGroup contains sync.noCopy

- **ID:** `go/waitgroup-copied-by-value`
- **Domain:** go
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing a sync.WaitGroup by value copies its internal state; the copy's Done never reaches the original's Wait, so Wait hangs or panics.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   func worker(wg *sync.WaitGroup) {
    defer wg.Done()
}
   ```
2. **** (95% success)
   ```
   type Pool struct { wg sync.WaitGroup }
func (p *Pool) Add() { p.wg.Add(1) }
   ```

## Dead Ends

- **** — The copy shares no state; Done on the copy doesn't decrement the original counter, so Wait blocks forever. (90% fail)
- **** — The state is still split across two structs; the mutex does not merge them. (85% fail)
