-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Description
The Privacy Detection sample MMDB file (privacy_detection_sample.mmdb) uses a different data type for boolean fields compared to the production database downloaded from IPinfo.
Problem
In the sample file, boolean fields (hosting, proxy, tor, relay, vpn) are stored as strings ("true" / "false").
In the production database, the same fields are stored as native booleans (true / false).
Reproduction
// Sample file - requires string type
type record struct {
Hosting string `maxminddb:"hosting"` // works: Hosting="true"
}
// Production file - requires bool type
type record struct {
Hosting bool `maxminddb:"hosting"` // works: Hosting=true
}Attempting to use bool type with the sample file results in:
maxminddb: cannot unmarshal true (string) into type bool
Attempting to use string type with the production file results in:
maxminddb: cannot unmarshal true (bool) into type string
Expected Behavior
Sample and production databases should have identical schemas to allow proper integration testing.
Metadata
Metadata
Assignees
Labels
No labels