# error: unexpected zero value received (channel closed, ok=false ignored)

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

## Root Cause

Reading from a closed channel returns the zero value immediately forever. Code that ignores the 'ok' bool treats zero values as real data, causing silent corruption.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use the comma-ok idiom: 'v, ok := <-ch; if !ok { return }' and break the loop on close
   ```
2. **** (93% success)
   ```
   Use 'for v := range ch { ... }' which terminates automatically when the channel closes
   ```

## Dead Ends

- **** — Closed channel always returns immediately; sleep just delays the wrong value (80% fail)
- **** — len is a snapshot and racy; does not distinguish closed from empty (85% fail)
