NonPtrValue returns the non-pointer underlying value
(v reflect.Value)
| 52 | |
| 53 | // NonPtrValue returns the non-pointer underlying value |
| 54 | func NonPtrValue(v reflect.Value) reflect.Value { |
| 55 | for v.Kind() == reflect.Ptr { |
| 56 | v = v.Elem() |
| 57 | } |
| 58 | return v |
| 59 | } |
| 60 | |
| 61 | // PtrValue returns the pointer version (Addr()) of the underlying value if |
| 62 | // the value is not already a Ptr |