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>
This commit is contained in:
committed by
Han-Wen Nienhuys
parent
b286ef4198
commit
d625dfd805
@@ -359,9 +359,8 @@ func testPermissionsPassing(withPermissions bool, t *testing.T) {
|
|||||||
PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) {
|
PublicKeyCallback: func(conn ConnMetadata, key PublicKey) (*Permissions, error) {
|
||||||
if conn.User() == "nopermissions" {
|
if conn.User() == "nopermissions" {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
} else {
|
|
||||||
return &Permissions{}, nil
|
|
||||||
}
|
}
|
||||||
|
return &Permissions{}, nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
serverConfig.AddHostKey(testSigners["rsa"])
|
serverConfig.AddHostKey(testSigners["rsa"])
|
||||||
@@ -510,9 +509,8 @@ func TestClientAuthMaxAuthTries(t *testing.T) {
|
|||||||
n--
|
n--
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
return "right", nil
|
return "right", nil
|
||||||
} else {
|
|
||||||
return "wrong", nil
|
|
||||||
}
|
}
|
||||||
|
return "wrong", nil
|
||||||
}), tries),
|
}), tries),
|
||||||
},
|
},
|
||||||
HostKeyCallback: InsecureIgnoreHostKey(),
|
HostKeyCallback: InsecureIgnoreHostKey(),
|
||||||
|
|||||||
Reference in New Issue
Block a user