Pārlūkot izejas kodu

Rename a method for clarity

Signed-off-by: Solomon Hykes <solomon@docker.com>
Solomon Hykes 11 gadi atpakaļ
vecāks
revīzija
a110ce2f28
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 2 1
      api/client/cli.go
  2. 1 1
      docker/docker.go

+ 2 - 1
api/client/cli.go

@@ -47,7 +47,8 @@ func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
 	return method.Interface().(func(...string) error), true
 }
 
-func (cli *DockerCli) ParseCommands(args ...string) error {
+// Cmd executes the specified command
+func (cli *DockerCli) Cmd(args ...string) error {
 	if len(args) > 0 {
 		method, exists := cli.getMethod(args[0])
 		if !exists {

+ 1 - 1
docker/docker.go

@@ -99,7 +99,7 @@ func main() {
 		cli = client.NewDockerCli(os.Stdin, os.Stdout, os.Stderr, protoAddrParts[0], protoAddrParts[1], nil)
 	}
 
-	if err := cli.ParseCommands(flag.Args()...); err != nil {
+	if err := cli.Cmd(flag.Args()...); err != nil {
 		if sterr, ok := err.(*utils.StatusError); ok {
 			if sterr.Status != "" {
 				log.Println(sterr.Status)