From d3682ac4719bd5892ceb21c15c66009c1e0b9b54 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Thu, 26 Feb 2026 14:41:28 -0500 Subject: [PATCH] use new wg pattern --- internal/agent/tools/diagnostics.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/agent/tools/diagnostics.go b/internal/agent/tools/diagnostics.go index bce1661151e12a78c1fc969077d70bfb4015fbc6..9697cefb049c3184cff13fe9c3de4ce6dd12dfb6 100644 --- a/internal/agent/tools/diagnostics.go +++ b/internal/agent/tools/diagnostics.go @@ -81,11 +81,9 @@ func waitForLSPDiagnostics( if !client.HandlesFile(filepath) { continue } - wg.Add(1) - go func() { - defer wg.Done() + wg.Go(func() { client.WaitForDiagnostics(waitCtx, timeout) - }() + }) } wg.Wait() }