Files
restic/internal/repository/pack/blobs.go
Michael Eischer e247118f49 repository: move Blob, Blobs and PackedBlob to pack package
This removes them from the public interface. The latter now only
provides the PackBlob interface, without being bound to the type used
internally by the pack package.
2026-06-05 12:25:03 +02:00

16 lines
255 B
Go

package pack
import (
"cmp"
"slices"
)
// Blobs is a list of blobs with pack layout information (offset, length, ...).
type Blobs []Blob
func (b Blobs) Sort() {
slices.SortFunc(b, func(a, b Blob) int {
return cmp.Compare(a.Offset, b.Offset)
})
}