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