From 31985fa80185eb17bf18ed3236fd4cdca3bdfc22 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Feb 2026 15:45:03 +0000 Subject: [PATCH] chore: use slices.Sorted(maps.Keys()) for ordered iteration --- cmd/setup/github_diff.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/setup/github_diff.go b/cmd/setup/github_diff.go index 9741ddb..2eaca66 100644 --- a/cmd/setup/github_diff.go +++ b/cmd/setup/github_diff.go @@ -4,6 +4,7 @@ package setup import ( "fmt" + "maps" "slices" "strings" @@ -184,12 +185,7 @@ func (cs *ChangeSet) printByCategory(category ChangeCategory, title string) { fmt.Println() // Print details (sorted for deterministic output) - keys := make([]string, 0, len(c.Details)) - for k := range c.Details { - keys = append(keys, k) - } - slices.Sort(keys) - for _, k := range keys { + for _, k := range slices.Sorted(maps.Keys(c.Details)) { fmt.Printf(" %s: %s\n", dimStyle.Render(k), c.Details[k]) } }