mirror of
https://github.com/restic/restic.git
synced 2026-09-21 19:48:30 +00:00
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.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user