summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-23 11:39:50 -0400
committerdemo <demo@antix1>2026-05-23 11:39:50 -0400
commitedce95c4a8ce11f81ef112e1e2fa183c6b3206d2 (patch)
tree5233a77601d90b914c5ec204d2e002fff741b827 /main.go
parent03f66133779ef2d35624ace7ecf1f427bece0b9b (diff)
feat: avoid sending empty URL slices to the worklist
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index 33989df..74e3144 100644
--- a/main.go
+++ b/main.go
@@ -70,7 +70,10 @@ loop:
sem <- struct{}{}
defer func() { <-sem }()
- worklist <- crawl(ctx, u)
+ more := crawl(ctx, u)
+ if len(more) > 0 {
+ worklist <- more
+ }
}()
}
}