summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-26 17:11:24 -0400
committerdemo <demo@antix1>2026-05-26 17:11:24 -0400
commitdfc111552917ceeabb0852cc6f1ba8a46fc21595 (patch)
tree3dd138127618be7c8da35dce4afc9ccdfcd7d44f
parentfb1bdcc58470ee7c56586cc604591f850ecd59ad (diff)
refactor: make deduplication part of main goroutine
-rw-r--r--main.go7
1 files changed, 5 insertions, 2 deletions
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()