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>
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 @@
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 @@
n--
if n == 0 {
return "right", nil
- } else {
- return "wrong", nil
}
+ return "wrong", nil
}), tries),
},
HostKeyCallback: InsecureIgnoreHostKey(),