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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user