From ca5ca56275010f5444fdd3ef6e85c4bcaa3e5578 Mon Sep 17 00:00:00 2001 From: Raushan Kumar Date: Sun, 19 Jul 2026 19:53:30 +0530 Subject: [PATCH] release: clarify order map naming Signed-off-by: Raushan Kumar --- internal/release/v2/util/kind_sorter.go | 6 +++--- pkg/release/v1/util/kind_sorter.go | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/release/v2/util/kind_sorter.go b/internal/release/v2/util/kind_sorter.go index c7912f7f9..353106ff2 100644 --- a/internal/release/v2/util/kind_sorter.go +++ b/internal/release/v2/util/kind_sorter.go @@ -158,10 +158,10 @@ func sortHooksByKind(hooks []*release.Hook, ordering KindSortOrder) []*release.H func lessByKind( kindA string, kindB string, - ordering map[string]int, + orderMap map[string]int, ) bool { - first, aok := ordering[kindA] - second, bok := ordering[kindB] + first, aok := orderMap[kindA] + second, bok := orderMap[kindB] if !aok && !bok { // if both are unknown then sort alphabetically by kind, keep original order if same kind diff --git a/pkg/release/v1/util/kind_sorter.go b/pkg/release/v1/util/kind_sorter.go index 427ee22c4..577b6a632 100644 --- a/pkg/release/v1/util/kind_sorter.go +++ b/pkg/release/v1/util/kind_sorter.go @@ -156,9 +156,13 @@ func sortHooksByKind(hooks []*release.Hook, ordering KindSortOrder) []*release.H return hooks } -func lessByKind(kindA string, kindB string, ordering map[string]int) bool { - first, aok := ordering[kindA] - second, bok := ordering[kindB] +func lessByKind( + kindA string, + kindB string, + orderMap map[string]int, +) bool { + first, aok := orderMap[kindA] + second, bok := orderMap[kindB] if !aok && !bok { // if both are unknown then sort alphabetically by kind, keep original order if same kind