Ip ranges/CIDR

,

Ewwwwwww. Doing this in Golang, that is reading from the database the GeoIP data.

Lets say I’m getting the data (I have my own custom function which returns as.Binmap:

rec, err := core.Get(client, "geoip", "ranges", "124.209.1")

But what I get back is a map[interface{}]interface{} which I cannot iterate through and then have to cast it into a map[interface{}]interface{}, so then i can put the key/value pairs into another map.

m2 := make(map[string]string)
foo := rec[host].(map[interface{}]interface{})

for key, value := range foo {
    m2[key.(string)] = value.(string)
}

m["ip_from"] = m2["ip_from"]
.......

Again, would be nice if someone from aerospike could chime in! :slight_smile: