in architecture.go [37:54]
func (a *Architecture) RootMgs() (res []*ArchitectureManagementGroup) {
for _, mg := range a.mgs {
if mg.parent != nil {
continue
}
res = append(res, mg)
}
slices.SortFunc(res, func(a, b *ArchitectureManagementGroup) int {
if a.id < b.id {
return -1
}
if a.id > b.id {
return 1
}
return 0
})
return res
}