From 38093a1610ace3fad7e4fe46ff8e199f885e7510 Mon Sep 17 00:00:00 2001 From: Ashutosh Singh Date: Sun, 14 Jul 2024 07:22:06 +0000 Subject: [PATCH] added the inline suggestion --- pkg/gameserverallocations/find.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/gameserverallocations/find.go b/pkg/gameserverallocations/find.go index c1c1225994..01ed9ec5da 100644 --- a/pkg/gameserverallocations/find.go +++ b/pkg/gameserverallocations/find.go @@ -49,12 +49,9 @@ func findGameServerForAllocation(gsa *allocationv1.GameServerAllocation, list [] } } case apis.Distributed: - // Determine if Priorities are set in the Fleet spec - prioritiesSet := len(gsa.Spec.Priorities) > 0 - // randomised looping - make a list of indices, and then randomise them // as we don't want to change the order of the gameserver slice - if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || !prioritiesSet { + if !runtime.FeatureEnabled(runtime.FeatureCountsAndLists) || len(gsa.Spec.Priorities) == 0 { l := len(list) indices := make([]int, l) for i := 0; i < l; i++ {