INNER CODE UNIT · Go
newApp
minio/operator · cmd/operator/main.go:51
func newApp(name string) *cli.App {
// Collection of console commands currently supported are.
var commands []cli.Command
// Collection of console commands currently supported in a trie tree.
commandsTree := trie.NewTrie()
// registerCommand registers a cli command.
registerCommand := func(command cli.Command) {
commands = append(commands, command)
commandsTree.Insert(command.Name)
}
// register commands
for _, cmd := range appCmds {
registerCommand(cmd)
}