# panic: interface conversion: interface is nil, not string (in goroutine)

- **ID:** `go/goroutine-racy-interface-conversion`
- **Domain:** go
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Goroutine attempts type assertion on a nil interface without checking, causing panic.

## Version Compatibility

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

## Workarounds

1. **Use comma-ok type assertion** (95% success)
   ```
   if s, ok := i.(string); ok {
    fmt.Println(s)
} else {
    log.Println("i is not string")
}
   ```
2. **Check for nil before type assertion** (90% success)
   ```
   if i != nil {
    if s, ok := i.(string); ok {
        fmt.Println(s)
    }
}
   ```

## Dead Ends

- **Using recover() to catch panic** — Recover works but doesn't fix the nil interface; data may be lost. (90% fail)
- **Ignoring type assertion and using raw interface** — Raw interface cannot be used as string; compilation error or runtime panic. (80% fail)
