Files
docker-cli/components/engine/api/client/commands.go
Sebastiaan van Stijn 41742b0589 Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
Upstream-commit: 08419313ec51b4e9c7db9e12c01cc6eea6cb8f16
Component: engine
2016-06-07 21:56:42 +02:00

26 lines
670 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{
"build": cli.CmdBuild,
"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,
"rm": cli.CmdRm,
"save": cli.CmdSave,
"stats": cli.CmdStats,
"update": cli.CmdUpdate,
"version": cli.CmdVersion,
}[name]
}