# panic: receive from closed channel (returned zero value)

- **ID:** `go/channel-receive-from-closed`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Receiving from a closed channel returns the zero value immediately, which may cause logic errors if not handled.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use the two-value receive form: v, ok := <-ch; if !ok { /* channel closed */ }
   ```
2. **** (90% success)
   ```
   Use a done channel to signal closure and avoid receiving from closed channels.
   ```

## Dead Ends

- **** — The zero value may be indistinguishable from real data, causing incorrect behavior. (80% fail)
- **** — This may skip important data or break the program's flow. (60% fail)
- **** — The boolean is only available in the two-value receive form; if not used, it's missed. (50% fail)
