Skip to content

Commit e3d74d9

Browse files
committed
Replace anonymous structs with named types
* Replace all anonymous nested structs with named types * Eliminate RegisteredCountry duplication, use CountryRecord * Optimize HasData methods with zero struct comparison * Simplify parent HasData methods using substruct methods This improves struct initialization ergonomics while maintaining the same JSON serialization behavior and performance.
1 parent 69ce248 commit e3d74d9

File tree

2 files changed

+348
-410
lines changed

2 files changed

+348
-410
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
from validation, allowing users to access network topology information even when
88
no GeoIP data is found. The Network and IPAddress fields are now always
99
populated for all lookups, regardless of whether GeoIP data is available.
10+
* **BREAKING CHANGE**: Replaced all anonymous nested structs with named types to
11+
improve struct initialization ergonomics. All result structs (Enterprise, City,
12+
Country) now use named types like `EnterpriseCityRecord`, `CityTraits`,
13+
`CountryRecord`, etc. This makes it much easier to initialize structs in user
14+
code while maintaining the same JSON serialization behavior.
1015

1116
# 2.0.0-beta.1 - 2025-06-22
1217

0 commit comments

Comments
 (0)