Use spf13/cobra for docker push and docker pull Upstream-commit: f0193e278c31fb568c4cbbdc046e84a0d1a3390b Component: engine
14 lines
348 B
Go
14 lines
348 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{
|
|
"cp": cli.CmdCp,
|
|
"exec": cli.CmdExec,
|
|
"info": cli.CmdInfo,
|
|
"inspect": cli.CmdInspect,
|
|
"ps": cli.CmdPs,
|
|
"update": cli.CmdUpdate,
|
|
}[name]
|
|
}
|