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:
Bala FA
2017-02-11 01:21:41 +05:30
committed by Harshavardhana
parent a799351926
commit 8912b6bf3b
4 changed files with 55 additions and 46 deletions
+5 -2
View File
@@ -16,13 +16,16 @@
package cmd
import "github.com/minio/cli"
import (
"github.com/minio/cli"
"github.com/minio/minio/pkg/trie"
)
// Collection of minio commands currently supported are.
var commands = []cli.Command{}
// Collection of minio commands currently supported in a trie tree.
var commandsTree = newTrie()
var commandsTree = trie.NewTrie()
// registerCommand registers a cli command.
func registerCommand(command cli.Command) {