Skip to content

Commit 82dbe8f

Browse files
mderynckamalavet
andauthored
Update codegen/templates/templates.go
Co-authored-by: Alejandro <61026152+amalavet@users.noreply.github.com>
1 parent 612b618 commit 82dbe8f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

codegen/templates/templates.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,7 @@ func (m ManifestGoFileMetadata) HasVersionSchemas() bool {
511511
// SortedRoleKeys returns the keys of ManifestData.Roles in sorted order
512512
// so the template produces deterministic output.
513513
func (m ManifestGoFileMetadata) SortedRoleKeys() []string {
514-
keys := make([]string, 0, len(m.ManifestData.Roles))
515-
for k := range m.ManifestData.Roles {
516-
keys = append(keys, k)
517-
}
514+
keys := slices.Collect(maps.Keys(m.ManifestData.Roles))
518515
slices.Sort(keys)
519516
return keys
520517
}

0 commit comments

Comments
 (0)