IndirectSafe dereferences if obj is a pointer, otherwise no-op
(obj interface{})
| 67 | |
| 68 | // IndirectSafe dereferences if obj is a pointer, otherwise no-op |
| 69 | func IndirectSafe(obj interface{}) interface{} { |
| 70 | if obj == nil { |
| 71 | return nil |
| 72 | } |
| 73 | return reflect.Indirect(reflect.ValueOf(obj)).Interface() |
| 74 | } |
no outgoing calls