Browse code

Rename a method for clarity

Signed-off-by: Solomon Hykes <solomon@docker.com>

Solomon Hykes authored on 2014/08/10 13:33:19
Showing 2 changed files
... ...
@@ -47,7 +47,8 @@ func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
47 47
 	return method.Interface().(func(...string) error), true
48 48
 }
49 49
 
50
-func (cli *DockerCli) ParseCommands(args ...string) error {
50
+// Cmd executes the specified command
51
+func (cli *DockerCli) Cmd(args ...string) error {
51 52
 	if len(args) > 0 {
52 53
 		method, exists := cli.getMethod(args[0])
53 54
 		if !exists {
... ...
@@ -99,7 +99,7 @@ func main() {
99 99
 		cli = client.NewDockerCli(os.Stdin, os.Stdout, os.Stderr, protoAddrParts[0], protoAddrParts[1], nil)
100 100
 	}
101 101
 
102
-	if err := cli.ParseCommands(flag.Args()...); err != nil {
102
+	if err := cli.Cmd(flag.Args()...); err != nil {
103 103
 		if sterr, ok := err.(*utils.StatusError); ok {
104 104
 			if sterr.Status != "" {
105 105
 				log.Println(sterr.Status)