repository: change LoadBlob, LookupBlob and LookupBlobSize to BlobHandles (#21857)

This commit is contained in:
Michael Eischer
2026-06-14 15:30:00 +02:00
committed by GitHub
parent 71f38d266c
commit 7d36449ea8
27 changed files with 85 additions and 85 deletions
+3 -3
View File
@@ -202,11 +202,11 @@ func TestLoadAllSnapshots(ctx context.Context, repo restic.ListerLoaderUnpacked,
// TestTreeMap returns the trees from the map on LoadTree.
type TestTreeMap map[restic.ID][]byte
func (t TestTreeMap) LoadBlob(_ context.Context, tpe restic.BlobType, id restic.ID, _ []byte) ([]byte, error) {
if tpe != restic.TreeBlob {
func (t TestTreeMap) LoadBlob(_ context.Context, bh restic.BlobHandle, _ []byte) ([]byte, error) {
if bh.Type != restic.TreeBlob {
return nil, fmt.Errorf("can only load trees")
}
tree, ok := t[id]
tree, ok := t[bh.ID]
if !ok {
return nil, fmt.Errorf("tree not found")
}