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