Closed nexcode closed 5 years ago
It takes first item:
func main() { db, err := maxminddb.Open("GeoIP2-City-Europe.mmdb") if err != nil { panic(err) } defer db.Close() var res interface{} db.Decode(0, &res) fmt.Println(res) }
How do I know which offset is needed for the second item?
You should be using the Networks method. Decode is only intended to be used with LookupOffset.
Networks
Decode
LookupOffset
It takes first item:
How do I know which offset is needed for the second item?