Documentation
¶
Overview ¶
Package domains provides utilities that help when working with domains
Index ¶
- type Map
- type Tree
- func (tree *Tree) BestMatch(domain string) (result interface{}, found bool)
- func (tree *Tree) Get(domain string) (result interface{}, found bool)
- func (tree *Tree) Insert(domain string, value interface{})
- func (tree *Tree) ToMap() Map
- func (tree *Tree) Walk(fn func(domain string, value interface{}) bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree is a radix-tree that supports domain-based matching including wildcard prefixes (specified with a leading .)
func NewTreeFromMap ¶
NewTreeFromMap constructs a Tree initialized from a given Map
Click to show internal directories.
Click to hide internal directories.