in generator/app.go [214:252]
func (c *Context) Sort() {
for _, groups := range c.PrefixToGroupMap() {
sort.Slice(groups, func(i, j int) bool {
return groups[i].Dir < groups[j].Dir
})
for _, group := range groups {
sort.Strings(group.StakeholderSIGs)
for _, people := range [][]Person{
group.Leadership.Chairs,
group.Leadership.TechnicalLeads,
group.Leadership.EmeritusLeads} {
sort.Slice(people, func(i, j int) bool {
// This ensure OWNERS / OWNERS_ALIASES files are ordered by github
return people[i].GitHub < people[j].GitHub
})
}
sort.Slice(group.Meetings, func(i, j int) bool {
return group.Meetings[i].Description < group.Meetings[j].Description
})
sort.Slice(group.Contact.GithubTeams, func(i, j int) bool {
return group.Contact.GithubTeams[i].Name < group.Contact.GithubTeams[j].Name
})
sort.Slice(group.Subprojects, func(i, j int) bool {
return group.Subprojects[i].Name < group.Subprojects[j].Name
})
for _, subproject := range group.Subprojects {
if subproject.Contact != nil {
sort.Slice(subproject.Contact.GithubTeams, func(i, j int) bool {
return subproject.Contact.GithubTeams[i].Name < subproject.Contact.GithubTeams[j].Name
})
}
sort.Strings(subproject.Owners)
sort.Slice(subproject.Meetings, func(i, j int) bool {
return subproject.Meetings[i].Description < subproject.Meetings[j].Description
})
}
}
}
}