mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
trie: new package (#3729)
This implements a simple trie tree for minio server/tools. This package borrows idea from https://godoc.org/golang.org/x/text/internal/triegen.
This commit is contained in:
@@ -94,7 +94,7 @@ func findClosestCommands(command string) []string {
|
||||
sort.Strings(closestCommands)
|
||||
// Suggest other close commands - allow missed, wrongly added and
|
||||
// even transposed characters
|
||||
for _, value := range commandsTree.walk(commandsTree.root) {
|
||||
for _, value := range commandsTree.Walk(commandsTree.Root()) {
|
||||
if sort.SearchStrings(closestCommands, value.(string)) < len(closestCommands) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user