Simplify public key generation

Intermediate string builder wasn't necessary.
This commit is contained in:
Anders Pitman 2020-10-12 18:37:46 -06:00
parent bf3f79fc63
commit 96611f4804

View File

@ -213,8 +213,7 @@ func MakeSSHKeyPair() (string, string, error) {
return "", "", err
}
var pubKeyBuf strings.Builder
pubKeyBuf.Write(ssh.MarshalAuthorizedKey(pub))
pubKey := string(ssh.MarshalAuthorizedKey(pub))
return pubKeyBuf.String(), privKeyBuf.String(), nil
return pubKey, privKeyBuf.String(), nil
}