Selaa lähdekoodia

cleanup: remove startCommand function, only used once, and
unecessary abstraction.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Jessica Frazelle 10 vuotta sitten
vanhempi
commit
7ba9a18ade
2 muutettua tiedostoa jossa 1 lisäystä ja 8 poistoa
  1. 1 1
      integration-cli/docker_cli_attach_test.go
  2. 0 7
      integration-cli/utils.go

+ 1 - 1
integration-cli/docker_cli_attach_test.go

@@ -50,7 +50,7 @@ func TestAttachMultipleAndRestart(t *testing.T) {
 				t.Fatal(err)
 				t.Fatal(err)
 			}
 			}
 
 
-			if _, err := startCommand(c); err != nil {
+			if err := c.Start(); err != nil {
 				t.Fatal(err)
 				t.Fatal(err)
 			}
 			}
 
 

+ 0 - 7
integration-cli/utils.go

@@ -95,13 +95,6 @@ func runCommand(cmd *exec.Cmd) (exitCode int, err error) {
 	return
 	return
 }
 }
 
 
-func startCommand(cmd *exec.Cmd) (exitCode int, err error) {
-	exitCode = 0
-	err = cmd.Start()
-	exitCode = processExitCode(err)
-	return
-}
-
 func logDone(message string) {
 func logDone(message string) {
 	fmt.Printf("[PASSED]: %s\n", message)
 	fmt.Printf("[PASSED]: %s\n", message)
 }
 }