Fix noinlineerr findings: internal/vaultik (refs #61)

This commit is contained in:
2026-08-07 16:59:56 +00:00
parent 919229f224
commit e7b49d58ab
10 changed files with 123 additions and 56 deletions

View File

@@ -29,13 +29,14 @@ func (v *Vaultik) NukeRemote(force bool) error {
v.UI.Begin("Removing all snapshot metadata from backup destination store.")
if _, err := v.RemoveAllSnapshots(&RemoveOptions{Force: true}); err != nil {
_, err := v.RemoveAllSnapshots(&RemoveOptions{Force: true})
if err != nil {
return fmt.Errorf("removing all snapshots: %w", err)
}
v.UI.Begin("Removing any blobs still present in backup destination store.")
err := v.PruneBlobs(&PruneOptions{Force: true})
err = v.PruneBlobs(&PruneOptions{Force: true})
if err != nil {
return fmt.Errorf("pruning blobs: %w", err)
}
@@ -74,7 +75,8 @@ func (v *Vaultik) Prune(opts *PruneOptions) error {
return fmt.Errorf("reconciling local snapshots with remote: %w", err)
}
if _, err := v.PruneDatabase(); err != nil {
_, err = v.PruneDatabase()
if err != nil {
return fmt.Errorf("pruning local database: %w", err)
}
@@ -121,7 +123,9 @@ func (v *Vaultik) PruneBlobs(opts *PruneOptions) error {
v.printfStdout("\nDelete %d unreferenced blob(s)? [y/N] ", len(unreferencedBlobs))
var confirm string
if _, err := v.scanStdin(&confirm); err != nil {
_, err = v.scanStdin(&confirm)
if err != nil {
v.printlnStdout("Cancelled")
return nil