Re: [go-nuts] Checking IP against CIDR ranges

2018-05-15 Thread Bakul Shah
On Tue, 15 May 2018 17:38:26 -0700 XXX ZZZ wrote: XXX ZZZ writes: > > 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

[go-nuts] Checking IP against CIDR ranges

2018-05-15 Thread XXX ZZZ
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 u