From 366915e16b042b00a1cd91483c038b667b839fac Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 4 Jun 2026 23:23:56 +0200 Subject: [PATCH] repository: require *Repository for ExaminePack The function wouldn't work with a different Repository implementation anyways. --- internal/repository/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/repository/debug.go b/internal/repository/debug.go index c3d5bfcd5..c6691380c 100644 --- a/internal/repository/debug.go +++ b/internal/repository/debug.go @@ -95,7 +95,7 @@ type ExaminePackOptions struct { } // ExaminePack loads and inspects a pack file and its index entries. -func ExaminePack(ctx context.Context, repo restic.Repository, id restic.ID, opts ExaminePackOptions, printer progress.Printer) error { +func ExaminePack(ctx context.Context, repo *Repository, id restic.ID, opts ExaminePackOptions, printer progress.Printer) error { printer.S("examine %v", id) buf, err := repo.LoadRaw(ctx, restic.PackFile, id) @@ -285,7 +285,7 @@ func decryptUnsigned(k *crypto.Key, buf []byte) []byte { return out } -func loadBlobs(ctx context.Context, opts ExaminePackOptions, repo restic.Repository, packID restic.ID, list restic.Blobs, printer progress.Printer) error { +func loadBlobs(ctx context.Context, opts ExaminePackOptions, repo *Repository, packID restic.ID, list restic.Blobs, printer progress.Printer) error { dec, err := zstd.NewReader(nil) if err != nil { panic(err)