1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

fix: update param type of CopyProperties

This commit is contained in:
dudaodong
2023-02-20 14:04:45 +08:00
parent be8a0558f8
commit f08b368001

View File

@@ -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))