mirror of
https://github.com/restic/restic.git
synced 2026-07-14 19:24:53 +00:00
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.
16 lines
255 B
Go
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)
|
|
})
|
|
}
|