IsNil returns true if the given interface is nil or the underlying value is nil.
(i interface{})
| 83 | |
| 84 | // IsNil returns true if the given interface is nil or the underlying value is nil. |
| 85 | func IsNil(i interface{}) bool { |
| 86 | return i == nil || (reflect.ValueOf(i).Kind() == reflect.Ptr && reflect.ValueOf(i).IsNil()) |
| 87 | } |
searching dependent graphs…