Skip to content

Commit 90a955c

Browse files
misc: fix minor lint issues
1 parent fdf385f commit 90a955c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/restore.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,9 @@ func Restore(backupReader io.Reader, targetDatabase, backupFilename string) erro
209209
// Try to get pg_restore error output for better diagnostics
210210
if waitErr := restoreProcess.Wait(); waitErr != nil {
211211
logger.Error().Err(waitErr).Msg("pg_restore process terminated with error during cleanup")
212-
return fmt.Errorf("failed to stream backup data to restore process: %w (pg_restore error: %v)", err, waitErr)
213-
} else {
214-
logger.Debug().Msg("pg_restore process terminated cleanly after streaming error")
212+
return fmt.Errorf("failed to stream backup data to restore process: %w (pg_restore error: %w)", err, waitErr)
215213
}
214+
logger.Debug().Msg("pg_restore process terminated cleanly after streaming error")
216215
return fmt.Errorf("failed to stream backup data to restore process: %w", err)
217216
}
218217

0 commit comments

Comments
 (0)