diff --git a/convertor/convertor.go b/convertor/convertor.go index e40b93b..083c4d3 100644 --- a/convertor/convertor.go +++ b/convertor/convertor.go @@ -344,7 +344,7 @@ func DeepClone[T any](src T) T { // CopyProperties copies each field from the source into the destination. It recursively copies struct pointers and interfaces that contain struct pointers. // Play: todo -func CopyProperties(dst, src interface{}) (err error) { +func CopyProperties[T, U any](dst T, src U) (err error) { defer func() { if e := recover(); e != nil { err = errors.New(fmt.Sprintf("%v", e))