func (st *structType) Copy(src, nv reflect.Value) {
	dst := nv.Elem()
	if st.fn != nil {
		if !src.CanInterface() {
			src = forceClearROFlag(src)
		}
		st.fn(src, dst)
		return
	}
	ptr := unsafe.Pointer(nv.Pointer())
	shadowCopy(src, ptr)
}
NewFrom creates a new value of src.Type() and shadow copies all content from src.
package clone
import (
	"crypto/elliptic"
	"fmt"
	"reflect"
	"sync"
	"sync/atomic"
	"time"
	"unsafe"
)
var (
	cachedStructTypes  sync.Map
	cachedPointerTypes sync.Map
)
func init() {
	MarkAsScalar(reflect.TypeOf(time.Time{}))
	MarkAsScalar(reflect.TypeOf(reflect.Value{}))
	p224 := elliptic.P224()
	MarkAsScalar(reflect.TypeOf(p224))
	MarkAsOpaquePointer(reflect.TypeOf(&elliptic.CurveParams{}))
	MarkAsOpaquePointer(reflect.TypeOf(reflect.TypeOf(0)))
	SetCustomFunc(reflect.TypeOf(sync.Mutex{}), emptyCloneFunc)
	SetCustomFunc(reflect.TypeOf(sync.RWMutex{}), emptyCloneFunc)
	SetCustomFunc(reflect.TypeOf(sync.WaitGroup{}), emptyCloneFunc)
	SetCustomFunc(reflect.TypeOf(sync.Cond{}), func(old, new reflect.Value) {
		oldL := old.FieldByName("L")
		newL := noState.clone(oldL)
		new.FieldByName("L").Set(newL)
	})
	SetCustomFunc(reflect.TypeOf(sync.Pool{}), func(old, new reflect.Value) {
		oldFn := old.FieldByName("New")
		newFn := noState.clone(oldFn)
		new.FieldByName("New").Set(newFn)
	})
	SetCustomFunc(reflect.TypeOf(sync.Map{}), func(old, new reflect.Value) {
		if !old.CanAddr() {
			return
		}
		oldMap := old.Addr().Interface().(*sync.Map)
		newMap := new.Addr().Interface().(*sync.Map)
		oldMap.Range(func(key, value interface{}) bool {
			k := Clone(key)
			v := Clone(value)
			newMap.Store(k, v)
			return true
		})
	})
	SetCustomFunc(reflect.TypeOf(atomic.Value{}), func(old, new reflect.Value) {
		if !old.CanAddr() {
			return
		}
		oldValue := old.Addr().Interface().(*atomic.Value)
		newValue := new.Addr().Interface().(*atomic.Value)
		v := Clone(oldValue.Load())
		newValue.Store(v)
	})
}
func MarkAsScalar(t reflect.Type) {
	for t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Struct {
		return
	}
	cachedStructTypes.Store(t, structType{})
}
func MarkAsOpaquePointer(t reflect.Type) {
	if t.Kind() != reflect.Ptr {
		return
	}
	cachedPointerTypes.Store(t, struct{}{})
}
type Func func(old, new reflect.Value)
func emptyCloneFunc(old, new reflect.Value) {}
func SetCustomFunc(t reflect.Type, fn Func) {
	for t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Struct {
		return
	}
	cachedStructTypes.Store(t, structType{
		fn: fn,
	})
}
type structType struct {
	PointerFields []structFieldType
	fn            Func
}
type structFieldType struct {
	Offset uintptr  
	Index  int      
}