Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipset

CI GitHub Release Coverage Status Go Report Card

ipset is a Go library for dealing with sets of CIDR prefixes. It uses a radix tree (r=2), also called a Patricia trie.

After creating an ipset.Set and populating it with prefixes, the Contains function can be used to check if a given address is contained by any of the prefixes in the set.

Usage

import "github.com/kentik/ipset"

set := ipset.NewSetFromCSV("10.0.0.0/8,172.16.0.0/16,192.168.0.0/255")
contained := set.Contains(net.ParseIP("10.1.128.0"))

License

See LICENSE for license information.

About

Another minimal Patricia trie (radix tree, r=2) implementation

Resources

Stars

1 star

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages