# panic: runtime error: select on nil channel

- **ID:** `go/goroutine-select-on-nil-channel`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using a nil channel in a select statement, which causes a permanent block and potential deadlock.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.19 | active | — | — |
| 1.20 | active | — | — |
| 1.21 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **Initialize channels before use in select** (95% success)
   ```
   ch := make(chan int); select { case v := <-ch: // use v }
   ```
2. **Check for nil before select** (90% success)
   ```
   if ch != nil { select { case v := <-ch: // } }
   ```

## Dead Ends

- **Adding default case without fixing nil** — Default case executes but nil channel still blocks if selected. (80% fail)
- **Using recover() to ignore** — Does not fix nil channel issue. (90% fail)
