MCPcopy Create free account
hub / github.com/cloudbase/garm / sortByID

Function sortByID

cache/util.go:22–26  ·  view source on GitHub ↗
(s []T)

Source from the content-addressed store, hash-verified

20)
21
22func sortByID[T params.IDGetter](s []T) {
23 sort.Slice(s, func(i, j int) bool {
24 return s[i].GetID() < s[j].GetID()
25 })
26}
27
28func sortByCreationDate[T params.CreationDateGetter](s []T) {
29 sort.Slice(s, func(i, j int) bool {

Callers 3

GetAllCredentialsMethod · 0.85
GetEntityScaleSetsMethod · 0.85
GetAllScaleSetsMethod · 0.85

Calls 1

GetIDMethod · 0.65

Tested by

no test coverage detected