Skip to content

Commit 784d4b5

Browse files
committed
remove unused code
1 parent e3c2454 commit 784d4b5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

trie.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,6 @@ func (t *Trie) insert(letters, value string) {
3838
}
3939
}
4040

41-
// Search for a string in the Trie.
42-
//
43-
// Returns the corresponding array of strings if found,
44-
// or an empty array otherwise.
45-
func (t *Trie) search(srch string) (found []string) {
46-
srchRune := []rune(srch)
47-
48-
for l, letter := range srchRune {
49-
letterString := string(letter)
50-
if t.children[letterString] != nil {
51-
t = t.children[letterString]
52-
} else {
53-
found = []string{""}
54-
return found
55-
}
56-
if l == len(srchRune)-1 {
57-
found = t.values
58-
}
59-
}
60-
return found
61-
}
62-
6341
// Convert a given string to the corresponding values
6442
// in the trie. This performed in a greedy fashion,
6543
// replacing the longest valid string it can find at any

0 commit comments

Comments
 (0)