finclip-app-manager/vendor/github.com/hashicorp/go-immutable-radix/edges.go

22 lines
267 B
Go
Raw Permalink Normal View History

2023-11-02 18:36:36 +08:00
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)
}