瀏覽代碼

Add missing "ok" on "common ok" idiom in test util

w/o this the "ok" we're checking is from the previous type assertion.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Doug Davis 10 年之前
父節點
當前提交
dd4693f67c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      integration-cli/utils.go

+ 1 - 1
integration-cli/utils.go

@@ -23,7 +23,7 @@ import (
 func getExitCode(err error) (int, error) {
 func getExitCode(err error) (int, error) {
 	exitCode := 0
 	exitCode := 0
 	if exiterr, ok := err.(*exec.ExitError); ok {
 	if exiterr, ok := err.(*exec.ExitError); ok {
-		if procExit := exiterr.Sys().(syscall.WaitStatus); ok {
+		if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok {
 			return procExit.ExitStatus(), nil
 			return procExit.ExitStatus(), nil
 		}
 		}
 	}
 	}