Procházet zdrojové kódy

ssh: fix if/else returns to adhere to Go style guidelines

Change-Id: Iea55e6397c49046d7d3e0eb66a392f1779d91802
Reviewed-on: https://go-review.googlesource.com/47050
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Spencer Tung před 8 roky
rodič
revize
d625dfd805
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. 2 4
      ssh/client_auth_test.go

+ 2 - 4
ssh/client_auth_test.go

@@ -359,9 +359,8 @@ func testPermissionsPassing(withPermissions bool, t *testing.T) {
 		PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) {
 			if conn.User() == "nopermissions" {
 				return nil, nil
-			} else {
-				return &Permissions{}, nil
 			}
+			return &Permissions{}, nil
 		},
 	}
 	serverConfig.AddHostKey(testSigners["rsa"])
@@ -510,9 +509,8 @@ func TestClientAuthMaxAuthTries(t *testing.T) {
 					n--
 					if n == 0 {
 						return "right", nil
-					} else {
-						return "wrong", nil
 					}
+					return "wrong", nil
 				}), tries),
 			},
 			HostKeyCallback: InsecureIgnoreHostKey(),