on main help sign in
use new wg pattern
d3682acTai Groot
internal/agent/tools/diagnostics.go+2−4
@@ -81,11 +81,9 @@ func waitForLSPDiagnostics(
81 if !client.HandlesFile(filepath) {
81 if !client.HandlesFile(filepath) {
82 continue
82 continue
83 }
83 }
84− wg.Add(1)
85− go func() {
84+ wg.Go(func() {
86− defer wg.Done()
87 client.WaitForDiagnostics(waitCtx, timeout)
85 client.WaitForDiagnostics(waitCtx, timeout)
88− }()
86+ })
89 }
87 }
90 wg.Wait()
88 wg.Wait()
91}
89}