remove unnecessary fmt.Sprintf call

default_preemtion.go has an unnecessary fmt.Sprintf call which
triggers common code checkers. This removes it.

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
This commit is contained in:
Ukri Niemimuukko 2023-11-25 21:36:04 +02:00
parent d61cbac69a
commit 02b0dc98dd

View File

@ -177,8 +177,7 @@ func (pl *DefaultPreemption) SelectVictimsOnNode(
// No potential victims are found, and so we don't need to evaluate the node again since its state didn't change.
if len(potentialVictims) == 0 {
message := fmt.Sprintf("No preemption victims found for incoming pod")
return nil, 0, framework.NewStatus(framework.UnschedulableAndUnresolvable, message)
return nil, 0, framework.NewStatus(framework.UnschedulableAndUnresolvable, "No preemption victims found for incoming pod")
}
// If the new pod does not fit after removing all the lower priority pods,