From 214da8a98c1ba7edc25778de89df3f6d31246064 Mon Sep 17 00:00:00 2001 From: Ricky White Date: Fri, 19 Jan 2024 12:32:13 -0500 Subject: [PATCH] Remove unused `PublicKey` in `KeyPair` (#47) --- internal/vault/vault.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/internal/vault/vault.go b/internal/vault/vault.go index 45aaf6d..7f305f0 100644 --- a/internal/vault/vault.go +++ b/internal/vault/vault.go @@ -15,7 +15,6 @@ type ConfigOptions struct { type KeyPair struct { PrivateKey string - PublicKey string Passphrase string } @@ -77,11 +76,6 @@ func FetchKeys(uid string) (*KeyPair, error) { return nil, fmt.Errorf("no private key found for UID: %s", uid) } - publicKey, ok := keys.(map[string]interface{})["publicKey"].(string) - if !ok || (publicKey == ""){ - return nil, fmt.Errorf("no public key found for UID: %s", uid) - } - // If a passphrase is set, it is stored in the password field of the // SSH template. If no passphrase is set, passPhrase is set to an empty // string. @@ -94,7 +88,6 @@ func FetchKeys(uid string) (*KeyPair, error) { return &KeyPair{ PrivateKey: privateKey, - PublicKey: publicKey, Passphrase: passPhrase, }, nil }