Add trie to verify wrong inputs, and provide meaningful messages

This commit is contained in:
Harshavardhana
2015-09-17 16:44:31 -07:00
parent d8656c80bc
commit 77c71bd596
3 changed files with 133 additions and 1 deletions
+4
View File
@@ -21,7 +21,11 @@ import "github.com/minio/cli"
// Collection of minio commands currently supported are
var commands = []cli.Command{}
// Collection of minio commands currently supported in a trie tree
var commandsTree = newTrie()
// registerCommand registers a cli command
func registerCommand(command cli.Command) {
commands = append(commands, command)
commandsTree.Insert(command.Name)
}