333ff22e9a
Embrace the future and use Go 1.6's vendor support via Godep. Go 1.5 users should `export GO15VENDOREXPERIMENT=1`
22 lines
267 B
Go
22 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)
|
|
}
|