// NewValue returns a new Value initialized to the concrete value // stored in the interface i. NewValue(nil) returns nil. func NewValue(i interface{}) Value { if i == nil { return nil } t, a := unsafe.Reflect(i) return newValue(toType(t), addr(a), true) }
// NewValue returns a new Value initialized to the concrete value // stored in the interface i. NewValue(nil) returns nil. func NewValue(i interface{}) Value { if i == nil { return nil } t, a := unsafe.Reflect(i) return newValue(canonicalize(toType(t)), addr(a), canSet|canAddr|canStore) }
func (self *Custom) GoString() string { _, addr := unsafe.Reflect(self) return fmt.Sprintf("#<%s: %x>", self.name, uintptr(addr)) }