Files
docker-cli/components/engine/api/client/commands.go
Vincent Demeester 28e4f2b97c Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fa67b984f8ec1aa7b8292777210f4643d4bc1bf0
Component: engine
2016-06-10 12:07:23 +02:00

18 lines
457 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,
"exec": cli.CmdExec,
"info": cli.CmdInfo,
"inspect": cli.CmdInspect,
"login": cli.CmdLogin,
"logout": cli.CmdLogout,
"ps": cli.CmdPs,
"push": cli.CmdPush,
"update": cli.CmdUpdate,
}[name]
}