MCPcopy Index your code
hub / github.com/go-python/gopy / PtrValue

Function PtrValue

gopyh/handle.go:63–68  ·  view source on GitHub ↗

PtrValue returns the pointer version (Addr()) of the underlying value if the value is not already a Ptr

(v reflect.Value)

Source from the content-addressed store, hash-verified

61// PtrValue returns the pointer version (Addr()) of the underlying value if
62// the value is not already a Ptr
63func PtrValue(v reflect.Value) reflect.Value {
64 if v.CanAddr() && v.Kind() != reflect.Ptr {
65 v = v.Addr()
66 }
67 return v
68}
69
70// Embed returns the embedded struct (in first field only) of given type within given struct
71func Embed(stru interface{}, embed reflect.Type) interface{} {

Callers 1

EmbedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected