MCPcopy
hub / github.com/go-chi/chi / Sort

Method Sort

tree.go:786–786  ·  view source on GitHub ↗

Sort the list of nodes by label

()

Source from the content-addressed store, hash-verified

784
785// Sort the list of nodes by label
786func (ns nodes) Sort() { sort.Sort(ns); ns.tailSort() }
787func (ns nodes) Len() int { return len(ns) }
788func (ns nodes) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] }
789func (ns nodes) Less(i, j int) bool { return ns[i].label < ns[j].label }

Callers 1

addChildMethod · 0.80

Calls 1

tailSortMethod · 0.95

Tested by

no test coverage detected