]> Cypherpunks.ru repositories - nncp.git/blob - src/sortbynice.go
Full go modules usage
[nncp.git] / src / sortbynice.go
1 package nncp
2
3 type ByNice []*SPInfo
4
5 func (a ByNice) Len() int {
6         return len(a)
7 }
8
9 func (a ByNice) Swap(i, j int) {
10         a[i], a[j] = a[j], a[i]
11 }
12
13 func (a ByNice) Less(i, j int) bool {
14         return a[i].Nice < a[j].Nice
15 }