Closed amogh09 closed 5 years ago
Hey, kudos for the good work.
By the way, FuzzySearch fails on empty string input. I will look into your code and see if I can fix it.
package main import "github.com/derekparker/trie" func main() { t := trie.New() t.Add("foo", 1) t.FuzzySearch("") }
Output -
panic: runtime error: index out of range goroutine 1 [running]: github.com/derekparker/trie.fuzzycollect(0xc000024080, 0xc000046688, 0x0, 0x20, 0x0, 0x20, 0x20) /home/amogh/go/src/github.com/derekparker/trie/trie.go:272 +0x4b0 github.com/derekparker/trie.Trie.FuzzySearch(0xc000024080, 0x1, 0x0, 0x0, 0x4aadf8, 0xc000024180, 0x0) /home/amogh/go/src/github.com/derekparker/trie/trie.go:117 +0x96 main.main() /home/amogh/go/src/tmp/tmp.go:8 +0xed exit status 2
Hey, kudos for the good work.
By the way, FuzzySearch fails on empty string input. I will look into your code and see if I can fix it.
Output -