mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
minor code improvement
minor code improvement from repeated assignments in loops to initialize outside the loop
This commit is contained in:
parent
d48b8167f7
commit
f762145e06
@ -952,8 +952,8 @@ func (f *frameworkImpl) RunScorePlugins(ctx context.Context, state *framework.Cy
|
||||
if len(plugins) > 0 {
|
||||
// Run Score method for each node in parallel.
|
||||
f.Parallelizer().Until(ctx, len(nodes), func(index int) {
|
||||
nodeName := nodes[index].Name
|
||||
for _, pl := range plugins {
|
||||
nodeName := nodes[index].Name
|
||||
s, status := f.runScorePlugin(ctx, pl, state, pod, nodeName)
|
||||
if !status.IsSuccess() {
|
||||
err := fmt.Errorf("plugin %q failed with: %w", pl.Name(), status.AsError())
|
||||
|
Loading…
Reference in New Issue
Block a user