@@ -40,16 +40,6 @@ func (t *deducerTrie) Delete(s string) (pathDeducer, bool) {
40
40
return nil , false
41
41
}
42
42
43
- // Get is used to lookup a specific key, returning the value and if it was found
44
- func (t * deducerTrie ) Get (s string ) (pathDeducer , bool ) {
45
- t .RLock ()
46
- defer t .RUnlock ()
47
- if d , has := t .t .Get (s ); has {
48
- return d .(pathDeducer ), has
49
- }
50
- return nil , false
51
- }
52
-
53
43
// Insert is used to add a newentry or update an existing entry. Returns if updated.
54
44
func (t * deducerTrie ) Insert (s string , d pathDeducer ) (pathDeducer , bool ) {
55
45
t .Lock ()
@@ -60,13 +50,6 @@ func (t *deducerTrie) Insert(s string, d pathDeducer) (pathDeducer, bool) {
60
50
return nil , false
61
51
}
62
52
63
- // Len is used to return the number of elements in the tree
64
- func (t * deducerTrie ) Len () int {
65
- t .RLock ()
66
- defer t .RUnlock ()
67
- return t .t .Len ()
68
- }
69
-
70
53
// LongestPrefix is like Get, but instead of an exact match, it will return the
71
54
// longest prefix match.
72
55
func (t * deducerTrie ) LongestPrefix (s string ) (string , pathDeducer , bool ) {
@@ -78,19 +61,6 @@ func (t *deducerTrie) LongestPrefix(s string) (string, pathDeducer, bool) {
78
61
return "" , nil , false
79
62
}
80
63
81
- // ToMap is used to walk the tree and convert it to a map.
82
- func (t * deducerTrie ) ToMap () map [string ]pathDeducer {
83
- m := make (map [string ]pathDeducer )
84
- t .RLock ()
85
- t .t .Walk (func (s string , d interface {}) bool {
86
- m [s ] = d .(pathDeducer )
87
- return false
88
- })
89
-
90
- t .RUnlock ()
91
- return m
92
- }
93
-
94
64
// isPathPrefixOrEqual is an additional helper check to ensure that the literal
95
65
// string prefix returned from a radix tree prefix match is also a path tree
96
66
// match.
0 commit comments