Skip to content

Commit f763e81

Browse files
authored
fix: archetypes order (#181)
* fix: archetypes ordering * fix: remove return value
1 parent e8aabb3 commit f763e81

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

architecture.go

+10-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@ func (mg *ArchitectureManagementGroup) Archetypes() (res []*Archetype) {
8080
for arch := range mg.archetypes.Iter() {
8181
res = append(res, arch.copy())
8282
}
83-
return res
83+
slices.SortFunc(res, func(a, b *Archetype) int {
84+
if a.name < b.name {
85+
return -1
86+
}
87+
if a.name > b.name {
88+
return 1
89+
}
90+
return 0
91+
})
92+
return
8493
}
8594

8695
// Children returns the child management groups of the management group.

0 commit comments

Comments
 (0)