~rbn/fit

ref: 277c36d91196048f9a8f73a0a74b014e1e25907d fit/item.go -rw-r--r-- 287 bytes
277c36d9Ruben Schuller moved fit.go to pack.go 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
package fit

type Item struct {
	Path string
	Size int64
}

type itemsBySize []Item

func (x itemsBySize) Len() int           { return len(x) }
func (x itemsBySize) Less(i, j int) bool { return x[i].Size < x[j].Size }
func (x itemsBySize) Swap(i, j int)      { x[i], x[j] = x[j], x[i] }