From d625dfd80595a76324dea1452ceb9cfbcaee8e3e Mon Sep 17 00:00:00 2001 From: Spencer Tung Date: Wed, 28 Jun 2017 11:18:03 -0700 Subject: 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 Run-TryBot: Han-Wen Nienhuys TryBot-Result: Gobot Gobot --- ssh/client_auth_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ssh/client_auth_test.go') diff --git a/ssh/client_auth_test.go b/ssh/client_auth_test.go index 2e9672a..89e0d92 100644 --- a/ssh/client_auth_test.go +++ b/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(), -- cgit v1.3