From dfc111552917ceeabb0852cc6f1ba8a46fc21595 Mon Sep 17 00:00:00 2001 From: demo Date: Tue, 26 May 2026 17:11:24 -0400 Subject: refactor: make deduplication part of main goroutine --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 418e2ef..d2337e1 100644 --- a/main.go +++ b/main.go @@ -57,9 +57,12 @@ func pool(startURL url.URL, maxConcurrency, maxURLs int) { } batches := fanIn(outlets...) - go deduplicate(batches, urls) - urls <- startURL + go func() { + urls <- startURL + }() + + deduplicate(batches, urls) fmt.Println("waiting") wg.Wait() -- cgit v1.2.3