Files
docker-cli/components/engine/api/client/commands.go
Sebastiaan van Stijn 593816f86f Merge pull request #23307 from WeiZhang555/cobra-restart
Migrate restart command to cobra
Upstream-commit: 88323c861a70f94b88870b7614bc91d2fdfd98e0
Component: engine
2016-06-07 15:28:35 +02:00

28 lines
723 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,
"images": cli.CmdImages,
"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,
"tag": cli.CmdTag,
"update": cli.CmdUpdate,
"version": cli.CmdVersion,
}[name]
}