```
refactor(blazing): 移除多余的 copier 依赖并优化赋值逻辑 移除了未使用的 github.com/jinzhu/copier 依赖包,并将原先使用 copier.Copy 的地方直接改为结构体指针解引用赋值,提升代码可读性和执行效率。 ```
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user