From 88c24627ca63efd5eae589f099984095a9c91e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Tue, 9 Dec 2025 19:16:15 +0800 Subject: [PATCH] =?UTF-8?q?```=20refactor(blazing):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=20copier=20=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E8=B5=8B=E5=80=BC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了未使用的 github.com/jinzhu/copier 依赖包,并将原先使用 copier.Copy 的地方直接改为结构体指针解引用赋值,提升代码可读性和执行效率。 ``` --- modules/blazing/model/pet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/blazing/model/pet.go b/modules/blazing/model/pet.go index 330acea12..14b09d069 100644 --- a/modules/blazing/model/pet.go +++ b/modules/blazing/model/pet.go @@ -12,7 +12,6 @@ import ( "github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/grand" - "github.com/jinzhu/copier" "github.com/samber/lo" ) @@ -225,7 +224,8 @@ func (pet *PetInfo) RnadAN() { } if pet.HaveAN() { - copier.Copy(pet.EffectInfo[0], ret) + pet.EffectInfo[0] = *ret + //copier.Copy(pet.EffectInfo[0], ret) } else { pet.EffectInfo = append(pet.EffectInfo, *ret) }