Files
docker-cli/components/engine/api/client/commands.go
Alexander Morozov 6c2f2ddb74 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
Upstream-commit: 3b08711bb75e30d850665312413a60f51114202f
Component: engine
2016-06-08 11:59:48 -07:00

23 lines
590 B
Go

package client
// Command returns a cli command handler if one exists
func (cli *DockerCli) Command(name string) func(...string) error {
return map[string]func(...string) error{
"commit": cli.CmdCommit,
"cp": cli.CmdCp,
"events": cli.CmdEvents,
"exec": cli.CmdExec,
"info": cli.CmdInfo,
"inspect": cli.CmdInspect,
"load": cli.CmdLoad,
"login": cli.CmdLogin,
"logout": cli.CmdLogout,
"ps": cli.CmdPs,
"pull": cli.CmdPull,
"push": cli.CmdPush,
"save": cli.CmdSave,
"stats": cli.CmdStats,
"update": cli.CmdUpdate,
}[name]
}