chore: remove unnecessary redeclarations in for loops (part 2) (#18593)

This commit is contained in:
ケイラ
2025-06-26 12:28:00 -06:00
committed by GitHub
parent e03d13211c
commit 09cc906981
14 changed files with 0 additions and 24 deletions
-2
View File
@@ -149,7 +149,6 @@ func (r *Runner) Init(scripts []codersdk.WorkspaceAgentScript, scriptCompleted S
if script.Cron == "" {
continue
}
script := script
_, err := r.cron.AddFunc(script.Cron, func() {
err := r.trackRun(r.cronCtx, script, ExecuteCronScripts)
if err != nil {
@@ -224,7 +223,6 @@ func (r *Runner) Execute(ctx context.Context, option ExecuteOption) error {
continue
}
script := script
eg.Go(func() error {
err := r.trackRun(ctx, script, option)
if err != nil {