From 66b113049b5945ba43dba46d3d3c20af3cd6195d Mon Sep 17 00:00:00 2001 From: Spencer Brower Date: Fri, 7 Nov 2025 11:50:21 -0500 Subject: [PATCH] refactor: Removed TODOs. --- app/config.go | 6 ++---- app/db.go | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/config.go b/app/config.go index bf8a672..e10279d 100644 --- a/app/config.go +++ b/app/config.go @@ -207,8 +207,7 @@ func (c Config) searchPaths() (paths []string, err error) { return paths, nil } -// TODO: Should this be private? -func (s SshKeyPair) Identity() (age.Identity, error) { +func (s SshKeyPair) identity() (age.Identity, error) { sshKey, err := os.ReadFile(s.Private) if err != nil { return nil, fmt.Errorf("failed to read SSH key: %w", err) @@ -222,8 +221,7 @@ func (s SshKeyPair) Identity() (age.Identity, error) { return id, nil } -// TODO: Should this be private? -func (s SshKeyPair) Recipient() (age.Recipient, error) { +func (s SshKeyPair) recipient() (age.Recipient, error) { sshKey, err := os.ReadFile(s.Public) if err != nil { return nil, fmt.Errorf("failed to read SSH key: %w", err) diff --git a/app/db.go b/app/db.go index e42dee6..dd2188c 100644 --- a/app/db.go +++ b/app/db.go @@ -107,7 +107,7 @@ func decryptDb(tmpFilePath string, keys []SshKeyPair) error { identities := make([]age.Identity, 0, len(keys)) for _, key := range keys { - id, err := key.Identity() + id, err := key.identity() if err != nil { return err @@ -245,7 +245,7 @@ func encryptDb(tmpFilePath string, keys []SshKeyPair) error { recipients := make([]age.Recipient, 0, len(keys)) for _, key := range keys { - recipient, err := key.Recipient() + recipient, err := key.recipient() if err != nil { return err