github.com/yl2chen/cidranger (go): Package cidranger provides utility to store CIDR blocks and perform ip inclusion tests against it.  To create a new instance of the path-compressed trie:  To insert or remove an entry (any object that satisfies the RangerEntry interface):  If you desire for any value to be attached to the entry, simply create custom struct that satisfies the RangerEntry interface:  To test whether an IP is contained in the constructed networks ranger:  To get a list of CIDR blocks in constructed ranger that contains IP:  To get a list of all IPv4/IPv6 rangers respectively:
Keywords: cidr|ip|network-analysis