Documentation ¶
Index ¶
- type Leaf
- type Regex
- type Trie
- func (t *Trie[T]) Clear(sequence []interface{})
- func (t *Trie[T]) Get(sequence []string) (value T, re []string, matched bool)
- func (t *Trie[T]) Leaves() (leaves []Leaf[T])
- func (t *Trie[T]) Partial(sequence []string) (result []Leaf[T])
- func (t *Trie[T]) Remap(from, to []interface{})
- func (t *Trie[T]) Set(sequence []interface{}, value T)
- func (t *Trie[T]) Source() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Regex ¶ added in v0.1.6
type Regex struct { Pattern string // contains filtered or unexported fields }
type Trie ¶
type Trie[T any] struct { deadlock.RWMutex // contains filtered or unexported fields }
func (*Trie[T]) Clear ¶ added in v0.1.11
func (t *Trie[T]) Clear(sequence []interface{})
Clear all mappings in the trie with the prefix `sequence`. An empty sequence will clear all mappings.
func (*Trie[T]) Get ¶
Get attempts to retrieve the leaf referred to by `sequence`. Any steps traversed using regex matches will be returned in `re` in the order in which they appeared in the sequence.
func (*Trie[T]) Leaves ¶
Leaves gets all of the leaves accessible from this Trie and the path to each leaf. Regex paths are represented as "re:[pattern]".
Click to show internal directories.
Click to hide internal directories.