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

doc: update go playground demo

This commit is contained in:
dudaodong
2023-04-27 12:03:15 +08:00
parent 4888909208
commit f93c561f5d
15 changed files with 78 additions and 24 deletions

View File

@@ -321,7 +321,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.
// use json.Marshal/Unmarshal, so json tag should be set for fields of dst and src struct.
// Play: todo
// Play: https://go.dev/play/p/oZujoB5Sgg5
func CopyProperties[T, U any](dst T, src U) error {
dstType, srcType := reflect.TypeOf(dst), reflect.TypeOf(src)