Hello,

I'm trying to check an IP against a list of several CIDR ranges, so far the 
most obvious way to do it seems to parse both the IP and the cidr ranges (
ParseCIDR) and then do a net.contain() however, if we have more than 1 CIDR 
we have to loop checking one by one which imho is incredible unefficient + 
slow if the cidr range is big.

Is there any more efficient way of achieving this? I have thought on making 
a map[string]string with all the IPs (within the CIDR) but the amount of 
required memory for big lists goes up to a few GB.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to