Skip to content

kobalt60/go-iptree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLang IPTree

Build Status

This is a golang based prefix tree for IP subnets

Install

go-iptree can be used by including:

import "github.com/zmap/go-iptree/iptree"

Usage

Below is a simple example:

t := iptree.New()
t.AddByString("0.0.0.0", 0)
t.AddByString("128.255.0.0/16", 1)
t.AddByString("128.255.134.0/24", 0)

if val, found, err := t.GetByString("128.255.134.5"); err == nil && found {
	fmt.Println("Value is ", val)
}

About

GoLang IP Radix Tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%