This commit is contained in:
withchao
2023-01-13 16:19:21 +08:00
parent b224b1ab40
commit c16a994fd4
+4 -1
View File
@@ -7,7 +7,10 @@ import (
)
func CopyAny(from, to interface{}) {
t := reflect.ValueOf(to).Elem()
t := reflect.ValueOf(to)
if t.Kind() == reflect.Ptr {
t = t.Elem()
}
if !t.CanSet() {
return
}