moby/api/client/commands.go
Vincent Demeester e884a515e9 Merge pull request #23334 from WeiZhang555/cobra-stats
Migrate stats and events command to cobra
2016-06-08 23:50:46 +02:00

20 lines
535 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,
"load": cli.CmdLoad,
"login": cli.CmdLogin,
"logout": cli.CmdLogout,
"ps": cli.CmdPs,
"pull": cli.CmdPull,
"push": cli.CmdPush,
"save": cli.CmdSave,
"update": cli.CmdUpdate,
}[name]
}