fix: resolve exported type stuttering issues (revive)

- Rename VaultMetadata to Metadata in internal/vault package to avoid stuttering
- Rename BIP85DRNG to DRNG in pkg/bip85 package to avoid stuttering
- Update all references in code and tests
This commit is contained in:
2025-06-20 12:47:06 -07:00
parent 4062242063
commit bdcddadf90
21 changed files with 89 additions and 34 deletions

View File

@@ -1283,6 +1283,7 @@ func test18AgeKeyOperations(t *testing.T, tempDir, secretPath, testMnemonic stri
fmt.Sprintf("HOME=%s", os.Getenv("HOME")),
}
output, err := cmd.CombinedOutput()
return string(output), err
}
@@ -1349,6 +1350,7 @@ func test19DisasterRecovery(t *testing.T, tempDir, secretPath, testMnemonic stri
fmt.Sprintf("HOME=%s", os.Getenv("HOME")),
}
output, err := cmd.CombinedOutput()
return string(output), err
}
@@ -1443,6 +1445,7 @@ func test20VersionTimestamps(t *testing.T, tempDir, secretPath, testMnemonic str
fmt.Sprintf("HOME=%s", os.Getenv("HOME")),
}
output, err := cmd.CombinedOutput()
return string(output), err
}
@@ -2076,6 +2079,7 @@ func readFile(t *testing.T, path string) []byte {
t.Helper()
data, err := os.ReadFile(path)
require.NoError(t, err, "Should be able to read file: %s", path)
return data
}
@@ -2125,6 +2129,7 @@ func copyDir(src, dst string) error {
}
}
}
return nil
}

View File

@@ -244,7 +244,7 @@ func (cli *Instance) VaultImport(cmd *cobra.Command, vaultName string) error {
existingMetadata, err := vault.LoadVaultMetadata(cli.fs, vaultDir)
if err != nil {
// If metadata doesn't exist, create new
existingMetadata = &vault.VaultMetadata{
existingMetadata = &vault.Metadata{
CreatedAt: time.Now(),
}
}

View File

@@ -126,6 +126,7 @@ func (cli *Instance) ListVersions(cmd *cobra.Command, secretName string) error {
status = "current (error)"
}
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", version, "-", status, "-", "-")
continue
}
@@ -192,5 +193,6 @@ func (cli *Instance) PromoteVersion(cmd *cobra.Command, secretName string, versi
}
cmd.Printf("Promoted version %s to current for secret '%s'\n", version, secretName)
return nil
}