Files
restic/internal/repository/index_testutil_test.go
T
Michael Eischer ccb5ae1592 restic: change ListBlobs to return PackBlob
PackBlob is a limited interface that only exposes a part of the
information provided by PackedBlob. Most of the changes are switches
from direct value lookups to the interface methods, with a few larger
changes to let the tests still work.
2026-06-13 17:54:38 +02:00

18 lines
390 B
Go

package repository
import (
"github.com/restic/restic/internal/restic"
)
// BlobsInPack returns index entries for blobs stored in packID, sorted by offset.
func BlobsInPack(repo *Repository, packID restic.ID) restic.Blobs {
var blobs restic.Blobs
for pb := range repo.idx.Values() {
if pb.PackID.Equal(packID) {
blobs = append(blobs, pb.Blob)
}
}
blobs.Sort()
return blobs
}