Handle Type Assertion Failures
The single return value form of a type assertion will panic on an incorrect type. Therefore, always use the "comma ok" idiom.
| Bad | Good |
|---|---|
| ```go t := i.(string) ``` | ```go t, ok := i.(string) if !ok { // handle the error gracefully } ``` |