fix: avoid use of range variable
This commit is contained in:
parent
a1999115db
commit
6f40fa554e
@ -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()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user