mirror of
https://github.com/restic/restic.git
synced 2026-06-20 23:54:17 +00:00
ccb5ae1592
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.
18 lines
390 B
Go
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
|
|
}
|