3 // Collection is a type that implements the sort.Interface interface
4 // so that versions can be sorted.
5 type Collection []*Version
7 func (v Collection) Len() int {
11 func (v Collection) Less(i, j int) bool {
12 return v[i].LessThan(v[j])
15 func (v Collection) Swap(i, j int) {
16 v[i], v[j] = v[j], v[i]