Documentation ¶
Overview ¶
Package glob provides a trie(also known as prefix-tree) that supports wildcard *.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
type PatternTrie ¶
type PatternTrie struct {
// contains filtered or unexported fields
}
Trie stores a value for each pattern.
func (*PatternTrie) Add ¶
func (t *PatternTrie) Add(pattern string, v interface{}) (ov interface{}, has bool)
Add inserts pattern into trie. If there is an old value for this pattern, old value will be returned and 'has' is set to true.
func (*PatternTrie) Lookup ¶
func (t *PatternTrie) Lookup(s string) (v interface{}, ok bool)
Lookup searchs pattern matching s most precisely and returns value associated with it. If not found, ok will be set to false.
Click to show internal directories.
Click to hide internal directories.