MCPcopy Index your code
hub / github.com/coder/coder / Ascending

Function Ascending

coderd/util/slice/slice.go:177–184  ·  view source on GitHub ↗
(a, b T)

Source from the content-addressed store, hash-verified

175}
176
177func Ascending[T constraints.Ordered](a, b T) int {
178 if a < b {
179 return -1
180 } else if a == b {
181 return 0
182 }
183 return 1
184}
185
186func Descending[T constraints.Ordered](a, b T) int {
187 return -Ascending[T](a, b)

Callers 9

insightsUserActivityMethod · 0.92
insightsUserLatencyMethod · 0.92
sortUsersFunction · 0.92
sortDatabaseUsersFunction · 0.92
convertParameterInsightsFunction · 0.92
UsersPaginationFunction · 0.92
sortNodeReportsFunction · 0.92
FindClosestNodeFunction · 0.92
TestAscendingFunction · 0.92

Calls

no outgoing calls

Tested by 3

sortUsersFunction · 0.74
sortDatabaseUsersFunction · 0.74
TestAscendingFunction · 0.74