mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f2614f2107
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
21 lines
267 B
Go
21 lines
267 B
Go
package iradix
|
|
|
|
import "sort"
|
|
|
|
type edges []edge
|
|
|
|
func (e edges) Len() int {
|
|
return len(e)
|
|
}
|
|
|
|
func (e edges) Less(i, j int) bool {
|
|
return e[i].label < e[j].label
|
|
}
|
|
|
|
func (e edges) Swap(i, j int) {
|
|
e[i], e[j] = e[j], e[i]
|
|
}
|
|
|
|
func (e edges) Sort() {
|
|
sort.Sort(e)
|
|
}
|