~rbn/fit

ref: be89c47f35a510556bf10a989ba06db073c166f8 fit/item.go -rw-r--r-- 287 bytes View raw
be89c47fRuben Schuller rename item field Path to Data and change type to []byte 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
package fit

type Item struct {
	Data []byte
	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] }