refactor: 参数绑定等优化

This commit is contained in:
meilin.huang
2026-02-07 13:12:07 +08:00
parent 403d1c45e5
commit 9bb9861d88
61 changed files with 762 additions and 436 deletions

View File

@@ -11,10 +11,10 @@ import (
)
// CopyTo 将fromValue转为T类型并返回
func CopyTo[T any](fromValue any) T {
t := NewInstance[T]()
Copy(t, fromValue)
return t
func CopyTo[T any](fromValue any) *T {
var t T
Copy(&t, fromValue)
return &t
}
// CopySliceTo 将fromValue转为[]T类型并返回