优化部分实现

This commit is contained in:
Yun
2025-09-21 00:30:53 +08:00
parent 898bdf7f38
commit 64b225f26d
2 changed files with 562 additions and 287 deletions
+558 -287
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -47,6 +47,8 @@ type NestedStruct struct {
Basic BasicStruct `json:"basic"`
Comment string `json:"comment"`
Amount decimal.Decimal `json:"amount"`
Amount2 *decimal.Decimal `json:"amount2"`
Timestamp time.Time `json:"timestamp"`
}
// 指针嵌套结构体
@@ -593,6 +595,8 @@ func BenchmarkAttactToStruct_Nested(b *testing.B) {
"basic.is_active": "true",
"comment": "test",
"amount": "500.0",
"amount2": "250.0",
"timestamp": "2024-01-01T12:00:00Z",
}
b.ResetTimer()