Merge pull request #15598 from alrs/helper-swallowed-error
Fix swallowed err in acctest package
This commit is contained in:
commit
c40be7cd14
|
@ -60,6 +60,9 @@ func RandStringFromCharSet(strlen int, charSet string) string {
|
||||||
// returned in OpenSSH format, and the private key is PEM encoded.
|
// returned in OpenSSH format, and the private key is PEM encoded.
|
||||||
func RandSSHKeyPair(comment string) (string, string, error) {
|
func RandSSHKeyPair(comment string) (string, string, error) {
|
||||||
privateKey, privateKeyPEM, err := genPrivateKey()
|
privateKey, privateKeyPEM, err := genPrivateKey()
|
||||||
|
if err != nil {
|
||||||
|
return "", "", err
|
||||||
|
}
|
||||||
|
|
||||||
publicKey, err := ssh.NewPublicKey(&privateKey.PublicKey)
|
publicKey, err := ssh.NewPublicKey(&privateKey.PublicKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue