release: clarify order map naming

Signed-off-by: Raushan Kumar <raus7n@gmail.com>
pull/32386/head
Raushan Kumar 3 months ago
parent db8da0a937
commit ca5ca56275

@ -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

@ -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

Loading…
Cancel
Save