Documentation ¶
Index ¶
- Constants
- func NopHook(interface{}) string
- type Binary
- type Trie
- func (t *Trie) AddPath(path string, value interface{})
- func (t *Trie) AddPathFor(path string, fn func(*Trie))
- func (t *Trie) HasElement() bool
- func (t *Trie) Match(path string) (*Trie, int, int)
- func (t *Trie) MatchFrom(nodestart int, path string) (tr *Trie, index int, typ int)
- func (t *Trie) MatchValue(path string) interface{}
- func (t *Trie) PrefixMatchValue(path string) interface{}
- func (t *Trie) Print(w io.Writer, withCurr bool, parentPath, sep string, ...)
- func (t *Trie) Visit(visitor func(string, interface{}))
Constants ¶
View Source
const ( TRIE_NO = iota // TRIE_NO means there is a chaacter don't match TRIE_PREFIX // TRIE_PREFIX means last node's `Str` is only match the begining part TRIE_FULL // TRIE_FULL means last node's `Str` is full matched )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Trie ¶
func (*Trie) AddPathFor ¶
func (*Trie) HasElement ¶
func (*Trie) MatchValue ¶
Match one longest route node and return values of path variable
func (*Trie) PrefixMatchValue ¶
PrefixMatchValue assumes each node as a prefix, it will match the longest prefix and return it's node value or nil
Click to show internal directories.
Click to hide internal directories.