From d92c354b6e9a05803351999b9ad090b9a5385443 Mon Sep 17 00:00:00 2001 From: guonaihong Date: Sat, 16 Dec 2023 23:12:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pcopy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcopy.go b/pcopy.go index 3e8cae0..144c067 100644 --- a/pcopy.go +++ b/pcopy.go @@ -89,7 +89,7 @@ func pcopyInner(dst, src interface{}, opt options) error { // 如果顶层对象是结构体,肯定会有预热结构 // 但是是其它类型可能没有预热结构, 所以这里要判断一下 if dstValue.Type().Kind() != reflect.Struct && srcValue.Type().Kind() != reflect.Struct { - saveToCache(dstSrcType{ + defer saveToCache(dstSrcType{ dst: dstValue.Type(), src: srcValue.Type(), },