MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / Less

Method Less

module/catalogue/tree.go:133–144  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

131}
132
133func (g Groups) Less(i, j int) bool {
134 if g[i].Depth == g[j].Depth {
135 if g[i].Parent == g[i].Parent {
136 if g[i].sort == g[j].sort {
137 return g[i].Uuid < g[j].Uuid
138 }
139 return g[i].sort < g[j].sort
140 }
141 return g[i].Parent < g[j].Parent
142 }
143 return g[i].Depth < g[j].Depth
144}
145
146func (g Groups) Swap(i, j int) {
147 g[i], g[j] = g[j], g[i]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected