1
0

fix: avoid use of range variable

This commit is contained in:
dump_stack() 2023-05-23 13:46:16 +00:00
parent a1999115db
commit 6f40fa554e
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -434,8 +434,6 @@ func GenerateKernels(km config.Target, registry string,
return return
} }
log.Info().Msgf("%d/%d %s", i+1, len(pkgs), pkg)
swg.Add() swg.Add()
if max <= 0 { if max <= 0 {
@ -444,7 +442,9 @@ func GenerateKernels(km config.Target, registry string,
break break
} }
go func() { log.Info().Msgf("%d/%d %s", i+1, len(pkgs), pkg)
go func(p string) {
defer swg.Done() defer swg.Done()
var attempt int var attempt int
for { for {
@ -455,7 +455,7 @@ func GenerateKernels(km config.Target, registry string,
return return
} }
err = installKernel(km, pkg, force, headers) err = installKernel(km, p, force, headers)
if err == nil { if err == nil {
max-- max--
break break
@ -469,7 +469,7 @@ func GenerateKernels(km config.Target, registry string,
log.Info().Msg("retry") log.Info().Msg("retry")
} }
} }
}() }(pkg)
} }
swg.Wait() swg.Wait()