(v interface{})
| 1140 | } |
| 1141 | |
| 1142 | func isNil(v interface{}) bool { |
| 1143 | if v == nil { |
| 1144 | return true |
| 1145 | } |
| 1146 | |
| 1147 | // Use reflection to check if the interface contains a nil concrete value |
| 1148 | rv := reflect.ValueOf(v) |
| 1149 | switch rv.Kind() { |
| 1150 | case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: |
| 1151 | return rv.IsNil() |
| 1152 | default: |
| 1153 | return false |
| 1154 | } |
| 1155 | } |
no outgoing calls
no test coverage detected